source: trunk/configure.ac @ 748

Last change on this file since 748 was 748, checked in by kulshres, 17 months ago

Merge branch 'activity' of 'gitclone' into 'svn'

The following commits were merged:
commit fc84dcabde90416ff32e8b08a06b7dad775e06bf
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Aug 4 10:36:17 2017 +0200

more debugging activity analysis

sign of coval is important in all cases, so I can't change it only
in one case.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b5f80a477d085d84c67ee71e2cf84ce6d926b858
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Aug 3 18:24:40 2017 +0200

correct some sign changes

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit e8642818244e33f0a4204fdffa936cc7195fc5bc
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Aug 3 14:57:46 2017 +0200

add activity tracking to parameters

parameters are always active since they can be changed after tracing
is complete using set_param_vec, just like independent variables.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit ae9f196ebbf225cd9a5e62e26266c2cbbbc8a5b2
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Aug 2 17:58:15 2017 +0200

add activity tracking to conditional assignments

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit c4b610de2500e949271d3bf60f04b5d34a229807
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jul 31 13:50:05 2017 +0200

simplify some operations during activity tracking

especially assignment from adub. make that equivalent to construction
from adub, by stealing rhs location. The problem with not stealing that
location would be to restore rhs previous activity before rhs was created
so that we can replace lhs into the previous operation. Since we don't have
a way of recreating activities from before, it's better to steal the
location of rhs and free the lhs location for reuse later.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 8e2ad08100254ee4309209d6c807928d6cab94ee
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jul 28 14:06:30 2017 +0200

add activity checking code in the operators and functions for adouble

conditional assignments do not track activity at the moment. Next step
is to make the parameters active too.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b8b6411ba29892d10d36bfe7a4d2abcbeb59ff67
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jul 28 13:59:36 2017 +0200

add a buffer in globalTapeVars to track activity of live variables

it is managed by the StoreManager? class for allocation and deallocation

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 569a7f28227991f8029e89b989c6f04415e8bd1a
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jul 28 13:58:32 2017 +0200

Add option to enable activity tracking in adouble class

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

  • Property svn:keywords set to Author Date Id Revision
File size: 23.6 KB
Line 
1##############################################################################
2# configure.ac -- Process this file with autoconf to produce configure
3# Revision: $Id: configure.ac 748 2018-02-28 12:16:05Z kulshres $
4#
5# Copyright (C) Andrea Walther, Andreas Kowarz
6#               
7# contains patches from the COIN OR libtool
8#
9##############################################################################
10define([ADOLC_VER], [2])
11define([ADOLC_SUB], [6])
12define([ADOLC_LVL], [3])
13
14AC_PREREQ(2.67)
15AC_INIT(adolc,
16        ADOLC_VER.ADOLC_SUB.ADOLC_LVL-trunk,
17        [adol-c@list.coin-or.org])
18config_flags="$*"
19AC_REVISION($Revision: 748 $)
20AC_CONFIG_SRCDIR([ADOL-C/src/adouble.cpp])
21AC_CONFIG_AUX_DIR([autoconf])
22AC_CONFIG_MACRO_DIR([autoconf])
23AC_CONFIG_HEADERS([ADOL-C/src/config.h])
24AC_PREFIX_DEFAULT(${HOME}/adolc_base)
25AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign subdir-objects])
26AM_MAINTAINER_MODE([disable])
27AM_SILENT_RULES([yes])
28
29
30adolclib=adolc
31
32if test "x$CFLAGS" == x ; then
33    ac_shell_cflags="not_set"
34else
35    ac_shell_cflags="$CFLAGS"
36fi
37if test "x$CXXFLAGS" == x ; then
38    ac_shell_cxxflags="not_set"
39else
40    ac_shell_cxxflags="$CXXFLAGS"
41fi
42libdir_set_on_cmd="no"
43for i in $config_flags ; do
44    case $i in
45    -libdir | --libdir | --libdi | --libd | -libdir=* | --libdir=* | --libdi=* | --libd=*)
46            libdir_set_on_cmd="yes"
47            break
48            ;;
49    esac
50done
51
52AM_CONDITIONAL(DARWIN, [test "x${host_os#darwin}" != "x${host_os}"])
53
54AC_MSG_CHECKING(whether to build ADOL-C with adjoinable MPI (AMPI) support)
55AC_ARG_ENABLE(ampi,
56              [AS_HELP_STRING([--enable-ampi],[build ADOL-C with adjoinable MPI (AMPI) support [default=disabled]])],
57              [adolc_ampi_support=$enableval],[adolc_ampi_support=no])
58AC_MSG_RESULT($adolc_ampi_support)
59AM_CONDITIONAL(BUILD_ADOLC_AMPI_SUPPORT,[test x${adolc_ampi_support} = xyes])
60if test x"${adolc_ampi_support}" = xyes ; then
61AC_DEFINE(ADOLC_AMPI_SUPPORT,1,[defined if adjoinable MPI support is to be compiled in])
62fi
63
64LT_PREREQ([2.2.6])
65# checks for programs
66AC_PROG_CXX
67AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
68AC_PROG_CC
69AC_PROG_CC_C_O
70AC_PROG_CC_C99
71AC_PROG_CPP
72AC_PROG_INSTALL
73AC_PROG_LN_S
74AC_PROG_MAKE_SET
75LT_INIT([disable-static win32-dll dlopen])
76
77if test "x$enable_static" != "xno" ; then
78   AC_MSG_WARN([Linking a user program with static ADOL-C library will always result in a segmentation fault])
79fi
80
81MPI_CONF_PRE
82
83AC_CHECK_SIZEOF([void *])
84if test "x$ac_cv_sizeof_void_p" = "x8" ; then
85   _lib=lib64
86else
87   _lib=lib
88fi
89if test "x$libdir_set_on_cmd" = "xno" ; then
90   libdir='${exec_prefix}'/"${_lib}"
91   AC_SUBST(_lib)
92   AC_SUBST(libdir)
93fi
94
95# check for builtin
96ACX_C_BUILTIN_EXPECT
97
98# checks for header files
99AC_HEADER_STDC
100AC_HEADER_TIME
101AC_HEADER_STDBOOL
102AC_CHECK_HEADERS([stddef.h stdlib.h stdio.h string.h unistd.h sys/timeb.h])
103
104# checks for types
105AC_C_CONST
106AC_C_INLINE
107AC_TYPE_SIZE_T
108AC_STRUCT_TM
109
110
111# Checks for libraries and fuctions
112AC_SEARCH_LIBS([pow], [m])
113AC_CHECK_FUNCS([floor fmax fmin ftime pow sqrt strchr strtol trunc])
114
115# substitutions
116AC_SUBST(ac_aux_dir)
117
118# ADOL-C configuration
119AC_DEFINE(ADOLC_VERSION,ADOLC_VER,[ADOL-C Version])
120AC_DEFINE(ADOLC_SUBVERSION,ADOLC_SUB,[ADOL-C Subversion])
121AC_DEFINE(ADOLC_PATCHLEVEL,ADOLC_LVL,[ADOL-C Patchlevel])
122ADOLC_VERSION=ADOLC_VER
123ADOLC_SUBVERSION=ADOLC_SUB
124ADOLC_PATCHLEVEL=ADOLC_LVL
125AC_SUBST(ADOLC_VERSION)
126AC_SUBST(ADOLC_SUBVERSION)
127AC_SUBST(ADOLC_PATCHLEVEL)
128
129# Checks for library functions
130AC_FUNC_MALLOC
131AC_FUNC_REALLOC
132if test x$ac_cv_func_malloc_0_nonnull != xyes ; then
133AC_DEFINE_UNQUOTED([calloc],[rpl_calloc],[Define to rpl_calloc if the replacement function should be used.])
134fi
135
136AC_MSG_CHECKING(whether to use calloc or malloc for memory allocation)
137AC_ARG_ENABLE(use-calloc,[AS_HELP_STRING([--disable-use-calloc],
138  [disable use of calloc and use malloc instead for memory allocation [default=calloc is used]])],
139  [use_calloc=$enableval],[use_calloc=yes])
140
141if test x$use_calloc = xyes ; then
142AC_MSG_RESULT(calloc)
143AC_DEFINE(ADOLC_USE_CALLOC,1,[Use calloc instead of malloc for memory allocation])
144else
145AC_MSG_RESULT(malloc)
146fi
147
148AC_MSG_CHECKING(whether to enable atrig/erf functions)
149AC_ARG_ENABLE(atrig-erf,[AS_HELP_STRING([--enable-atrig-erf],
150  [enable atrig and erf functions in ADOL-C [default=no]])],
151  [use_atrig_erf=$enableval],[use_atrig_erf=no])
152AC_MSG_RESULT($use_atrig_erf)
153
154if test x$use_atrig_erf = xyes ; then
155  ATRIG_ERF="#define ATRIG_ERF 1"
156else
157  ATRIG_ERF="#undef ATRIG_ERF"
158fi
159AC_SUBST(ATRIG_ERF)
160
161AC_MSG_CHECKING(whether to use 32-bit or 64-bit locations)
162AC_ARG_ENABLE(ulong,[AS_HELP_STRING([--enable-ulong],
163  [enable 64-bit locations (only available on 64-bit systems) [default=32-bit]])],
164  [use_ulong=$enableval],[use_ulong=no])
165
166if test x$use_ulong = xyes -a 0$ac_cv_sizeof_void_p -ge 8 ; then
167  UINT_TYPE=uint64_t
168  AC_MSG_RESULT(64-bit)
169else
170  UINT_TYPE=uint32_t
171  AC_MSG_RESULT(32-bit)
172fi
173AC_SUBST(UINT_TYPE)
174
175AC_MSG_CHECKING(whether to use single or double precision)
176AC_ARG_ENABLE(double,[AS_HELP_STRING([--disable-double],
177  [disable double precision arithmetic [untested, default=double is enabled]])],
178  [use_double=$enableval],[use_double=yes])
179
180if test x$use_double = xno ; then
181  REAL_TYPE=float
182  echo
183  echo -n "using ${REAL_TYPE} is not well tested, please report bugs if you find any..."
184else
185  REAL_TYPE=double
186fi
187AC_MSG_RESULT($REAL_TYPE)
188AC_SUBST(REAL_TYPE)
189
190AC_MSG_CHECKING(whether to enable advanced branching operations)
191AC_ARG_ENABLE(advanced-branching, [AS_HELP_STRING([--enable-advanced-branching],
192  [enable advanced branching operations to reduce retaping [default=no].
193The boolean valued comparison operators with two adouble arguments will
194not return boolean results but the active results may be used to automatically
195switch branches in conjunction with condassign or advector (see manual).])],
196  [use_advbranch=$enableval],[use_advbranch=no])
197AC_MSG_RESULT($use_advbranch)
198
199if test x$use_advbranch = xyes ; then
200  ADVBRANCH="#define ADOLC_ADVANCED_BRANCHING 1"
201else
202  ADVBRANCH="#undef ADOLC_ADVANCED_BRANCHING"
203fi
204AC_SUBST(ADVBRANCH)
205
206AC_MSG_CHECKING(whether to enable activity tracking)
207AC_ARG_ENABLE(activity-tracking, [AS_HELP_STRING([--enable-activity-tracking],
208  [enable activity tracking to reduce trace size but increased tracing time [default=no].
209Only the operations involving actual dependency relationships from the
210independent variables will be recorded on the trace, this however
211requires more checks to be performed during the tracing and increases
212tracing time. Useful only if memory is a constraint and tracing is
213done fewer times than derivative computations.])],
214  [use_activities=$enableval],[use_activities=no])
215AC_MSG_RESULT($use_activities)
216
217if test x$use_activities = xyes ; then
218AC_DEFINE(ADOLC_TRACK_ACTIVITY,1,[ADOL-C activity tracking in live variables])
219fi
220
221AC_MSG_CHECKING(whether to use ADOL-C debug mode)
222AC_ARG_ENABLE(debug,
223              [
224AS_HELP_STRING([--enable-debug],[enable ADOL-C debug mode [default=no]])],
225  [
226  adolc_debug=$enableval
227   AC_MSG_RESULT($adolc_debug)
228   ],
229  [
230   adolc_debug=no
231   AC_MSG_RESULT(no)
232   ])
233
234AC_MSG_CHECKING(whether to use ADOL-C hard debug mode)
235AC_ARG_ENABLE(harddebug,
236              [
237AS_HELP_STRING([--enable-harddebug],[enable ADOL-C hard debug mode
238 [default=no]])],
239  [
240   adolc_harddebug=$enableval
241   AC_MSG_RESULT($adolc_harddebug)
242   ],
243  [
244   adolc_harddebug=no
245   AC_MSG_RESULT(no)
246   ])
247
248if test x$adolc_harddebug == xyes ; then
249adolc_debug=yes
250AC_DEFINE(ADOLC_HARDDEBUG,1,[ADOL-C hard debug mode])
251fi
252
253if test x$adolc_debug == xyes ; then
254AC_DEFINE(ADOLC_DEBUG,1,[ADOL-C debug mode])
255fi
256
257AC_MSG_CHECKING(whether the default adouble constructor should initialize the value to 0)
258AC_ARG_ENABLE(stdczero,
259              [
260AS_HELP_STRING([--disable-stdczero],[adouble default constructor does not initialize the value to zero
261(improves performance but yields incorrect results for implicit array initializations, see manual) [default=enabled]])],
262  [
263  adolc_stdczero=no
264  AC_MSG_RESULT(no)
265  ],
266  [
267  adolc_stdczero=yes
268  AC_MSG_RESULT(yes)
269  ])
270
271if test x$adolc_stdczero == xyes; then
272AC_DEFINE(ADOLC_ADOUBLE_STDCZERO,1,[ADOL-C adouble zeroing mode])
273fi
274
275AC_MSG_CHECKING(whether the adouble variables have a late initialize option for functions like malloc/realloc)
276AC_ARG_ENABLE(lateinit,
277              [
278AS_HELP_STRING([--enable-lateinit],[adouble constructors need to be called. With malloc or realloc that is not the case. With this option the adouble can do a late initialization.) [default=disabled]])],
279  [
280  adolc_late_init=yes
281  AC_MSG_RESULT(yes)
282  ],
283  [
284  adolc_late_init=no
285  AC_MSG_RESULT(no)
286  ])
287
288if test x$adolc_late_init == xyes; then
289AC_DEFINE(ADOLC_ADOUBLE_LATEINIT,1,[ADOL-C adouble late initialization mode])
290fi
291
292AC_MSG_CHECKING(whether errno is thread save)
293AC_ARG_ENABLE(tserrno,
294              [
295AS_HELP_STRING([--enable-tserrno],[use errno as thread number cache [default=no]])],
296  [
297  adolc_tserrno=$enableval
298  AC_MSG_RESULT($adolc_tserrno)
299   ],
300  [
301  adolc_tserrno=no
302  AC_MSG_RESULT(no)
303  ])
304
305if test x$adolc_tserrno == xyes ; then
306AC_DEFINE(ADOLC_THREADSAVE_ERRNO,1,[ADOL-C thread save errno mode])
307fi
308
309AC_MSG_CHECKING(which flag to use to enable OpenMP)
310AC_ARG_WITH(openmp-flag,
311            [AS_HELP_STRING([--with-openmp-flag=FLAG],
312                            [use FLAG to enable OpenMP at compile time [default=none]])],
313            [ac_adolc_openmpflag=$withval
314             AC_MSG_RESULT($ac_adolc_openmpflag)],
315            [ac_adolc_openmpflag=""
316             AC_MSG_RESULT(none)])
317
318AX_BOOST_BASE([1.54],[boost_new=yes],[boost_new=no])
319if test x$boost_new = xyes ; then
320CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
321AC_LANG_PUSH([C++])
322AC_CHECK_HEADERS([boost/pool/pool_alloc.hpp])
323AC_LANG_POP([C++])
324AX_BOOST_SYSTEM
325LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $BOOST_SYSTEM_LIB"
326fi
327
328if test "x$want_boost" = xyes -a "x$boost_new" = xyes -a "x$ac_cv_header_boost_pool_pool_alloc_hpp" = xyes -a "x$link_system" = xyes ; then
329    using_boost_pool=yes
330    USE_BOOST_POOL="#define USE_BOOST_POOL 1"
331else
332    using_boost_pool=no
333    USE_BOOST_POOL="#define USE_BOOST_POOL 0"
334fi
335AC_SUBST(USE_BOOST_POOL)
336
337if test "x$using_boost_pool" = xyes -a "x$ac_adolc_openmpflag" = x ; then
338   AC_DEFINE(BOOST_POOL_NO_MT,1,[Boost pool should not assume multithreading])
339fi
340
341# ADOL-C Sparse facility
342AC_MSG_CHECKING(whether to build sparse drivers)
343AC_ARG_ENABLE(sparse,
344            [
345AS_HELP_STRING([--enable-sparse],[build sparse drivers [default=disabled]])],
346            [sparse=$enableval
347             AC_MSG_RESULT($sparse)],
348            [sparse="no"
349             AC_MSG_RESULT(no)])
350
351COLPACK_CONF
352
353AM_CONDITIONAL(SPARSE,[test x${sparse} = xyes])
354
355if test x$sparse = xyes ; then
356   AC_DEFINE(SPARSE,[1],[Define 1 if sparse derivative propagation is to be enabled])
357fi
358
359# ADOL-C Examples
360AC_MSG_CHECKING(whether to build documented examples)
361AC_ARG_ENABLE(docexa,
362            [
363AS_HELP_STRING([--enable-docexa],[build documented examples [default=disabled]])],
364            [docexa=$enableval
365             AC_MSG_RESULT(yes)],
366            [docexa="no"
367             AC_MSG_RESULT(no)])
368AM_CONDITIONAL(DOCEXA,[test x${docexa} = xyes])
369
370AC_MSG_CHECKING(whether to build additional examples)
371AC_ARG_ENABLE(addexa,
372            [AS_HELP_STRING([--enable-addexa],
373                            [build additional examples [default=disabled]])],
374            [addexa=$enableval
375             AC_MSG_RESULT(yes)],
376            [addexa="no"
377             AC_MSG_RESULT(no)])
378AM_CONDITIONAL(ADDEXA,[test x${addexa} = xyes])
379
380AC_MSG_CHECKING(whether to build parallel example)
381AC_ARG_ENABLE(parexa,
382            [AS_HELP_STRING([--enable-parexa],
383                            [build parallel example [default=disabled], if enabled -with-openmp-flag=FLAG required])],
384            [parexa=$enableval
385             AC_MSG_RESULT(yes)],
386            [parexa="no"
387             AC_MSG_RESULT(no)])
388AM_CONDITIONAL(PAREXA,[test x${parexa} = xyes])
389
390# ADOL-C Compilation flags
391AC_MSG_CHECKING(which CFLAGS to use)
392AC_ARG_WITH(cflags,
393            [AS_HELP_STRING([--with-cflags=FLAGS],
394                            [use CFLAGS=FLAGS (default: -O2)])],
395            [ac_adolc_cflags="$withval"
396             if test x${adolc_debug} == xyes ||
397                test x${adolc_harddebug} == xyes ; then
398                ac_adolc_cflags="$ac_adolc_cflags -g -O0"
399             fi
400             ac_adolc_cflags="$ac_adolc_cflags $ac_adolc_openmpflag"
401             AC_SUBST(ac_adolc_cflags)
402             AC_MSG_RESULT($ac_adolc_cflags)],
403            [if test "$ac_shell_cflags" = "not_set"; then
404                ac_adolc_cflags="-O2"
405                if test x${adolc_debug} == xyes ||
406                   test x${adolc_harddebug} == xyes ; then
407                   ac_adolc_cflags="-g -O0 -Wall -ansi"
408                fi
409             else
410                ac_adolc_cflags="$CFLAGS"
411             fi
412             ac_adolc_cflags="$ac_adolc_cflags $ac_adolc_openmpflag"
413
414             AC_SUBST(ac_adolc_cflags)
415             AC_MSG_RESULT($ac_adolc_cflags)])
416
417AC_MSG_CHECKING(which CXXFLAGS to use)
418AC_ARG_WITH(cxxflags,
419            [AS_HELP_STRING([--with-cxxflags=FLAGS],
420                            [use CXXFLAGS=FLAGS (default: -O2)])],
421            [ac_adolc_cxxflags="$withval"
422             if test x${adolc_debug} == xyes ||
423                test x${adolc_harddebug} == xyes ; then
424                ac_adolc_cxxflags="$ac_adolc_cxxflags -g -O0"
425             fi
426             ac_adolc_cxxflags="$ac_adolc_cxxflags $ac_adolc_openmpflag"
427             AC_SUBST(ac_adolc_cxxflags)
428             AC_MSG_RESULT($ac_adolc_cxxflags)],
429            [if test "$ac_shell_cxxflags" = "not_set"; then
430                ac_adolc_cxxflags="-O2"
431                if test x${adolc_debug} == xyes ||
432                   test x${adolc_harddebug} == xyes ; then
433                   ac_adolc_cxxflags="-g -O0 -Wall"
434                fi
435             else
436                ac_adolc_cxxflags="$CXXFLAGS"
437             fi
438             ac_adolc_cxxflags="$ac_adolc_cxxflags $ac_adolc_openmpflag"
439            AC_SUBST(ac_adolc_cxxflags)
440            AC_MSG_RESULT($ac_adolc_cxxflags)])
441
442MPI_CONF_POST
443AMPI_CONF
444
445AC_ARG_WITH(soname,
446            [AS_HELP_STRING([--with-soname=NAME],
447              [user can choose what to call his library here [default: if ampi enabled then adolc_ampi otherwise adolc]])],
448      [adolclib=$withval])
449
450AC_SUBST(adolclib)
451
452AC_MSG_CHECKING(whether tape_doc should compute values as it prints the tape contents)
453AC_ARG_ENABLE(tapedoc_values,
454              [
455                AS_HELP_STRING([--disable-tapedoc-values],
456                               [should the tape_doc routine compute the values as it interprets and prints the tape contents [default=enabled]])],
457  [
458  tapedoc_values=no
459  ],
460  [
461  tapedoc_values=yes
462  ])
463AC_MSG_RESULT($tapedoc_values)
464
465if test x$tapedoc_values == xyes; then
466AC_DEFINE(ADOLC_TAPE_DOC_VALUES,1,[ADOL-C tape_doc routine computes values])
467fi
468
469###########################################################################
470#                      COIN_PATCH_LIBTOOL_CYGWIN                          #
471###########################################################################
472
473# Patches to libtool for cygwin. Lots for cl, a few for GCC.
474# For cl:
475# - cygpath is not correctly quoted in fix_srcfile_path
476# - paths generated for .lib files is not run through cygpath -w
477
478#
479# REQUIRED FOR COMPILATION WITH CYGWIN !!!
480#
481 
482
483AC_DEFUN([AC_COIN_PATCH_LIBTOOL_CYGWIN],
484[ case "$CXX" in
485    clang* | */clang*)
486        # do nothing but don't want to accidentally match the 'cl' patterns below
487        ;;
488    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
489      AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
490      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
491          -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
492          -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
493          -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
494          -e 's%lib /OUT:%lib -OUT:%' \
495          -e "s%cygpath -w%$CYGPATH_W%" \
496          -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo '"$mydos2unix"'\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
497          -e 's/$AR t/lib -nologo -list/' \
498          -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
499          -e 's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
500          -e 's%old_archive_cmds="lib -OUT:\\$oldlib\\$oldobjs\\$old_deplibs"%old_archive_cmds="if test -r \\$oldlib; then bla=\\"\\$oldlib\\"; else bla=; fi; lib -OUT:\\$oldlib \\\\\\$bla\\$oldobjs\\$old_deplibs"%' \
501      libtool > conftest.bla
502
503      mv conftest.bla libtool
504      chmod 755 libtool
505      ;;
506    *)
507      AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
508      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
509          -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
510          -e 's|libext="lib"|libext="a"|' \
511      libtool > conftest.bla
512
513      mv conftest.bla libtool
514      chmod 755 libtool
515      ;;
516  esac ]) # COIN_PATCH_LIBTOOL_CYGWIN
517 
518
519# output
520AC_CONFIG_FILES(Makefile
521                ADOL-C/Makefile
522                ADOL-C/include/Makefile
523                ADOL-C/include/adolc/Makefile
524                ADOL-C/include/adolc/internal/adolc_settings.h
525                ADOL-C/include/adolc/drivers/Makefile
526                ADOL-C/include/adolc/internal/Makefile
527                ADOL-C/include/adolc/lie/Makefile
528                ADOL-C/include/adolc/sparse/Makefile
529                ADOL-C/include/adolc/tapedoc/Makefile
530                ADOL-C/src/Makefile
531                ADOL-C/src/drivers/Makefile
532                ADOL-C/src/lie/Makefile
533                ADOL-C/src/sparse/Makefile
534                ADOL-C/src/tapedoc/Makefile
535                ADOL-C/doc/version.tex
536                ADOL-C/examples/Makefile
537                ADOL-C/examples/additional_examples/Makefile
538                ADOL-C/examples/additional_examples/cuda/Makefile
539                ADOL-C/examples/additional_examples/clock/Makefile
540                ADOL-C/examples/additional_examples/checkpointing/Makefile
541                ADOL-C/examples/additional_examples/ext_diff_func/Makefile
542                ADOL-C/examples/additional_examples/fixpoint_exam/Makefile
543                ADOL-C/examples/additional_examples/hessmat/Makefile
544                ADOL-C/examples/additional_examples/lie/Makefile
545                ADOL-C/examples/additional_examples/lufact/Makefile
546                ADOL-C/examples/additional_examples/openmp_exam/Makefile
547                ADOL-C/examples/additional_examples/scal/Makefile
548                ADOL-C/examples/additional_examples/speelpenning/Makefile
549                ADOL-C/examples/additional_examples/taylor/Makefile
550                ADOL-C/examples/additional_examples/detexam/Makefile
551                ADOL-C/examples/additional_examples/helm/Makefile
552                ADOL-C/examples/additional_examples/lighthouse/Makefile
553                ADOL-C/examples/additional_examples/ode/Makefile
554                ADOL-C/examples/additional_examples/sparse/Makefile
555                ADOL-C/examples/additional_examples/tapesave/Makefile
556                ADOL-C/examples/additional_examples/pow/Makefile
557                ADOL-C/examples/additional_examples/timing/Makefile
558                ADOL-C/examples/additional_examples/param/Makefile
559                ADOL-C/test/Makefile
560                MSVisualStudio/v14/sparse/config.h
561                MSVisualStudio/v14/nosparse/config.h
562                MSVisualStudio/v14/x64/sparse/config.h
563                MSVisualStudio/v14/x64/nosparse/config.h
564                adolc.spec
565                adolclib.pc
566)
567
568AC_OUTPUT
569
570#call libtool for cygwin
571AC_COIN_PATCH_LIBTOOL_CYGWIN
572warn=false
573# echo configuration
574echo \
575"
576-----------------------------------------------------------------------------
577Configuration:
578
579  C compiler:                         ${CC}
580  C++ compiler:                       ${CXX}
581  Linker:                             ${LD}
582  Source code location:               `pwd`
583  Install path:                       ${prefix}
584 
585  CFLAGS:                             ${ac_adolc_cflags}
586  CXXFLAGS:                           ${ac_adolc_cxxflags}
587
588  Use Boost pool allocator:           ${using_boost_pool}
589  Use ADOL-C debug mode:              ${adolc_debug}
590  Use ADOL-C hard debug mode:         ${adolc_harddebug}
591  Zero value in adouble default ctor: ${adolc_stdczero}"
592
593if [[ "x${ac_adolc_openmpflag}" != "x" ]] ; then
594    echo \
595"  Access thread number via errno:     ${adolc_tserrno}"
596fi
597
598echo \
599"  Use ADOL-C activity tracking:       ${use_activities}
600  Use ADOL-C late init mode:          ${adolc_late_init}
601
602  Build sparse drivers:               ${sparse}
603  Build with adjoinable MPI support:  ${adolc_ampi_support}
604  Build with ColPack:                 ${have_colpack}"
605if test x$sparse = xyes && test x$have_colpack = xno; then
606    echo -e \
607"  \033@<:@1;31mCompressed sparse structures will not be available
608  Only sparsity patterns can be computed\033@<:@0m"
609    warn=true
610fi
611echo
612
613echo \
614"  Build documented examples:          ${docexa}
615  Build additional examples:          ${addexa}
616  tape_doc routine computes values:   ${tapedoc_values}
617
618  See ADOL-C/src/config.h for further configuration information.
619-----------------------------------------------------------------------------"
620
621# check for make install problems resulting from missing write permission
622pdir=${prefix}
623writable=true
624while test "x${pdir}" != "x/" ; do
625    if test -e ${pdir} && test ! -w ${pdir}; then
626        writable=false
627        break
628    elif test ! -e ${pdir} ; then
629        pdir=`dirname ${pdir}`
630    else
631        break
632    fi
633done
634if test "x${pdir}" == "x/" ; then
635    writable=false
636fi
637if ! ${writable} ; then
638    echo -e \
639"  \033@<:@1;31mPrefix ${prefix} not writable
640  please run ./configure --prefix=DIR
641  with a writable directory path otherwise administrator privileges
642  will be required to run \`make install'\033@<:@0m"
643    warn=true
644fi
645
646case ${prefix} in
647   ${HOME}|${HOME}/*)
648if $warn ; then
649    for (( i=5; i>0; i-- )); do
650        echo -ne "\rPlease read the above messages carefully, continuing in ${i} seconds"
651        sleep 1
652    done
653    echo -e "\rPlease read the above messages carefully                                 "
654fi
655echo \
656"
657*****************************************************************************
658
659  To successfully compile and run programs using the ADOL-C shared library do
660  the following things:
661     compiling:
662        * add \"-I${prefix}/include\" to your compiler call
663     linking:
664        * add \"-L${libdir} -l$adolclib\" to your linker call
665        * extend your linker call by \"-Wl,--rpath -Wl,${libdir}\"
666          (if you wish to skip the point \"executing\")
667     executing (do one of the following things):
668        * add ${libdir} to your LD_LIBRARY_PATH variable
669        * ask your system administrator for adding ${libdir} to
670          the global file containing library search paths (/etc/ld.so.conf)
671
672     (or use the static library by replacing
673        \"-L${libdir} -l$adolclib\" with
674        \"${libdir}/lib$adolclib.a\" when linking)
675
676  See README for instructions on how to change to a nonlocal installation!
677
678*****************************************************************************
679"
680;;
681esac
682if test "x$enable_static" != "xno" ; then
683echo \
684" Linking a user program with a static ADOL-C library will always result
685  in a segmentation fault. Please always use the shared library.
686*****************************************************************************
687"
688fi
Note: See TracBrowser for help on using the repository browser.