source: trunk/configure.ac @ 375

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

Move some options out of usrparms.h

These should be set using the configure script arguments and are
now in a new generated header file that will be installed via
make install. This include ATRIG_ERF, and the typedefs for locint/revreal
A new option ADOLC_ADVANCED_BRANCHING is also created.

ADOLC_USE_CALLOC goes into config.h as this is only required for build
but not after installation

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

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