source: stable/2.5/configure.ac @ 492

Last change on this file since 492 was 492, checked in by kulshres, 7 years ago

Revert "prepare for releasing version 2.5.0"

This reverts commit 868a4f95144eb36cc4da37180fe0d88e51a6e052.

After tagging release continue stable development

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