source: trunk/configure.ac @ 517

Last change on this file since 517 was 513, checked in by kulshres, 6 years ago

since clang++ will fail without -std=c++11 check for it in configure

g++ works with this flag too and while we're at it, check for c99
compatibility for pure C code too.

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

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