Annotation of rpl/configure.ac, revision 1.229

1.1       bertrand    1: dnl Process this file with autoconf to produce a configure script.
1.229   ! bertrand    2: AC_INIT([rpl],[4.1.30])
1.1       bertrand    3: AC_CANONICAL_TARGET
                      4: AC_CANONICAL_TARGET
1.8       bertrand    5: AM_INIT_AUTOMAKE(silent-rules)
1.9       bertrand    6: AM_SILENT_RULES([yes])
1.1       bertrand    7: AC_SUBST(target_cpu)
                      8: AC_CONFIG_HEADERS([rplconfig.h])
                      9: 
                     10: dnl Libraries
1.127     bertrand   11: NCURSES=ncurses-6.0
1.172     bertrand   12: READLINE=readline-7.0
1.209     bertrand   13: UNITS=units-2.16
1.224     bertrand   14: GSL=gsl-2.5
1.1       bertrand   15: GPP=gpp-3.0
1.227     bertrand   16: GNUPLOT=gnuplot-5.2.5
1.210     bertrand   17: FILE=file-5.33
1.193     bertrand   18: ICONV=libiconv-1.15
1.226     bertrand   19: SQLITE=sqlite-3.26.0
1.225     bertrand   20: OPENSSL=openssl-1.1.1a
1.213     bertrand   21: OPENMOTIF=motif-2.3.8
1.199     bertrand   22: LIBXPM=libXpm-3.5.12
1.214     bertrand   23: SIGSEGV=libsigsegv-2.12
1.215     bertrand   24: ZLIB=zlib-1.2.11
1.1       bertrand   25: 
1.193     bertrand   26: GMP=gmp-6.1.2
1.216     bertrand   27: MPFR=mpfr-4.0.1
                     28: MPFI=mpfi-1.5.3
                     29: NTL=ntl-11.0.0
                     30: COCOA=CoCoALib-0.99563
                     31: PARI=pari-2.9.5
1.217     bertrand   32: GIAC=giac-1.4.9
1.1       bertrand   33: 
1.33      bertrand   34: dnl 32 bits ABI
                     35: AC_ARG_WITH(gcc_version,
                     36: [  --with-gcc-version      force gcc version],[
                     37: CC=gcc-$with_gcc_version
                     38: CXX=g++-$with_gcc_version
                     39: CF=gfortran-$with_gcc_version
                     40: F77=gfortran-$with_gcc_version
1.43      bertrand   41: AC_SUBST(CC)
                     42: AC_SUBST(CXX)
                     43: AC_SUBST(CF)
                     44: AC_SUBST(F77)
1.33      bertrand   45: ],[])
                     46: 
1.37      bertrand   47: dnl Checks for Bash
1.100     bertrand   48: BASH_PATH=$(which bash)
1.37      bertrand   49: BASH=$(which bash | sed 's/\//\\\//g')
                     50: 
                     51: if test x$BASH = x; then
                     52:    AC_MSG_ERROR([Cannot find bash! You have to install it.])
                     53: fi
                     54: 
                     55: AC_SUBST(BASH)
1.100     bertrand   56: AC_SUBST(BASH_PATH)
1.37      bertrand   57: 
1.1       bertrand   58: dnl Checks for C compiler
                     59: AC_PROG_CC(gcc)
                     60: 
                     61: EXT_SQL=
                     62: 
                     63: AM_PROG_CC_C_O
                     64: 
                     65: if test "$GCC" != yes; then
                     66:    AC_MSG_ERROR([Cannot find gcc! You have to install it.])
                     67: fi
                     68: 
                     69: dnl Checks for C++ compiler
                     70: AC_PROG_CXX(g++)
                     71: 
1.2       bertrand   72: if test "$GXX" != yes; then
1.1       bertrand   73:    AC_MSG_ERROR([Cannot find g++! You have to install it.])
                     74: fi
                     75: 
                     76: dnl Checks for Fortran 77 compiler
                     77: AC_PROG_F77(gfortran)
                     78: 
1.3       bertrand   79: dnl Check for Fortran 9* compiler
                     80: AC_PROG_FC(gfortran)
                     81: 
1.92      bertrand   82: if test x"$F77" = x; then
1.1       bertrand   83:    AC_MSG_ERROR([Cannot find gfortran! You have to install it.])
                     84: fi
                     85: 
1.92      bertrand   86: if test x"$FC" = x; then
1.1       bertrand   87:    AC_MSG_ERROR([Cannot find gfortran! You have to install it.])
                     88: fi
                     89: 
1.33      bertrand   90: OPTIMISATION_C=-O3
                     91: OPTIMISATION_CXX=-O3
                     92: OPTIMISATION_F=-O3
1.1       bertrand   93: 
                     94: dnl X paths
                     95: AC_PATH_X
                     96: AC_PATH_XTRA
                     97: 
                     98: if test "$ac_x_includes" != "no"; then
                     99:    if test x"$ac_x_includes" != x; then
                    100:        X_CFLAGS="$X_CFLAGS -I$ac_x_includes"
                    101:        includeX="-I$ac_x_includes"
                    102:    fi
                    103: fi
                    104: if test "$ac_x_libraries" != "no"; then
                    105:    if test x"$ac_x_libraries" != x; then
                    106:        X_LIBS="$X_LIBS -L$ac_x_libraries"
                    107:    fi
                    108: fi
                    109: 
                    110: dnl 32 bits ABI
                    111: AC_ARG_WITH(32bits-abi,
                    112: [  --with-32bits-abi       force 32bits ABI (multilib)],[
1.23      bertrand  113: if test "$with_32bits_abi" = "no"; then
1.1       bertrand  114:    ABI=
                    115: else
                    116:    ABI=-m32
                    117: fi],[
                    118:    ABI=
                    119:    ]
                    120: )
                    121: 
                    122: if test x$ABI = x; then
                    123: AC_ARG_WITH(64bits-abi,
                    124: [  --with-64bits-abi       force 64bits ABI (multilib)],[
1.23      bertrand  125: if test "$with_64bits_abi" = "no"; then
1.1       bertrand  126:    ABI=
                    127: else
                    128:    ABI=-m64
                    129: fi],[
                    130:    ABI=
                    131:    ]
                    132: )
                    133: fi
                    134: 
                    135: LDFLAGS="$LDFLAGS $ABI"
                    136: 
1.23      bertrand  137: AC_ARG_WITH(sysroot,
                    138: [  --with-sysroot          sysroot for cross compilation],[
                    139: if test "$with_sysroot" = "no" -o "$with_rpltools" = "yes"; then
                    140:    AC_MSG_ERROR([You have to specify sysroot path !])
                    141: else
1.24      bertrand  142:    SYSROOT="-I$with_sysroot/usr/include"
1.25      bertrand  143:    SYSROOT2=$with_sysroot
1.23      bertrand  144: fi],[
                    145:    SYSROOT=
1.25      bertrand  146:    SYSROOT2=
1.23      bertrand  147:    ]
                    148: )
                    149: 
1.6       bertrand  150: AC_ARG_ENABLE(recursive,
                    151: [  --enable-recursive      recursive configuration (default=yes)],[
                    152: if test "$enableval" = "yes"; then
                    153:    RECURSIVE=yes
                    154: else
                    155:    RECURSIVE=no
                    156: fi],[
                    157:    RECURSIVE=yes
                    158:    ]
                    159: )
                    160: 
1.141     bertrand  161: AC_ARG_ENABLE(native,
                    162: [  --enable-native         enable gcc native compiler option (default=no)],[
                    163: if test "$enableval" = "yes"; then
                    164:    CFLAGS="$CFLAGS -mtune=native -march=native"
                    165:    FFLAGS="$FFLAGS -mtune=native -march=native"
                    166:    CXXFLAGS="$CXXFLAGS -mtune=native -march=native"
                    167:    FCFLAGS="$FCFLAGS -mtune=native -march=native"
                    168: else
                    169:    NATIVE=
                    170: fi],[
                    171:    NATIVE=
                    172:    ]
                    173: )
                    174: 
1.3       bertrand  175: AC_ARG_WITH(rpltools,
                    176: [  --with-rpltools         specify rpltools path used for cross compilation],[
1.23      bertrand  177: if test "$with_rpltools" = "no" -o "$with_rpltools" = "yes"; then
1.3       bertrand  178:    AC_MSG_ERROR([You have to specify rpltools path !])
                    179: else
                    180:    RPLTOOLS=$with_rpltools
                    181: fi],[
                    182:    RPLTOOLS=\$\(top_builddir\)
                    183:    ]
                    184: )
                    185: 
                    186: AC_SUBST(RPLTOOLS)
                    187: 
1.1       bertrand  188: dnl RPL/CAS support
1.3       bertrand  189: AC_ARG_ENABLE(rplcas,
                    190: [  --enable-rplcas         compile rplcas (default=no)],[
                    191: if test "$enableval" = "no"; then
1.1       bertrand  192:    RPLCAS=-URPLCAS
                    193:    LIBRPLCAS=
1.95      bertrand  194:    INCRPLCAS=
1.1       bertrand  195: else
                    196:    RPLCAS=-DRPLCAS
1.223     bertrand  197:    LIBRPLCAS="\$(top_builddir)/rplcas/lib/librplcas.a"
                    198:    LIBS+="-lcurl"
1.95      bertrand  199:    INCRPLCAS="-I\$(top_builddir)/rplcas/include/giac \
                    200:            -I\$(top_builddir)/rplcas/include"
1.1       bertrand  201: fi],[
                    202:    RPLCAS=-URPLCAS
                    203:    LIBRPLCAS=
1.95      bertrand  204:    INCRPLCAS=
1.1       bertrand  205:    ]
                    206: )
                    207: 
                    208: AC_SUBST(ABI)
                    209: AC_SUBST(RPLCAS)
                    210: AC_SUBST(LIBRPLCAS)
1.95      bertrand  211: AC_SUBST(INCRPLCAS)
1.1       bertrand  212: 
                    213: dnl Options
                    214: AC_ARG_ENABLE(optimization,
1.187     bertrand  215: [  --enable-optimization   set compiler flags [[default=environment variables -O2, enable=environment variables -O3]]], [
1.1       bertrand  216: if test "$enableval" = "no"; then
                    217:    CFLAGS=$ABI
                    218:    FFLAGS=$ABI
                    219:    CXXFLAGS=$ABI
                    220:    FCFLAGS=$ABI
                    221: else
1.141     bertrand  222:    CFLAGS="$CFLAGS $ABI $OPTIMISATION_C" 
                    223:    FFLAGS="$FFLAGS $ABI $OPTIMISATION_F"
                    224:    CXXFLAGS="$CXXFLAGS $ABI $OPTIMISATION_CXX"
                    225:    FCFLAGS="$FCFLAGS $ABI $OPTIMISATION_F"
1.1       bertrand  226: fi],[
1.187     bertrand  227:    CFLAGS="$CFLAGS $ABI -O2" 
                    228:    FFLAGS="$FFLAGS $ABI -O2"
                    229:    CXXFLAGS="$CXXFLAGS $ABI -O2"
                    230:    FCFLAGS="$FCFLAGS $ABI -O2"
1.1       bertrand  231:    ]
                    232: )
                    233: 
1.93      bertrand  234: CFLAGS="$CFLAGS -fno-strict-overflow"
                    235: 
1.6       bertrand  236: AC_MSG_CHECKING([for usable shared memory])
                    237: AC_COMPILE_IFELSE(
                    238:    [AC_LANG_PROGRAM([#include <sys/shm.h>
                    239:     ],
                    240:    [ return(0); ])],
                    241: [SHARED_MEMORY=-DSHARED_MEMORY; AC_MSG_RESULT(yes)],
                    242: [SHARED_MEMORY=-USHARED_MEMORY; AC_MSG_RESULT(no)]
                    243:    )
                    244: AC_SUBST(SHARED_MEMORY)
                    245: 
1.116     bertrand  246: AC_C_INLINE
                    247: 
                    248: if test "$ac_cv_c_inline" != no ; then
                    249:    AC_DEFINE(HAVE_INLINE,1,[inline keywork or macro available])
                    250:     AC_SUBST(HAVE_INLINE)
                    251: fi
                    252: 
1.2       bertrand  253: AC_ARG_ENABLE(sysv-ipcs,
1.1       bertrand  254: [  --enable-sysv-ipcs      use SystemV IPC functions [[default=guessed]]], [
                    255: if test "$enableval" = "no"; then
1.3       bertrand  256:    IPCS_SYSV=-UIPCS_SYSV
                    257:    POSIX_IPCS=no
1.1       bertrand  258: else
1.3       bertrand  259:    IPCS_SYSV=-DIPCS_SYSV
                    260:    POSIX_IPCS=yes
1.1       bertrand  261: fi],
1.91      bertrand  262: REG=$LIBS
1.3       bertrand  263: POSIX_IPCS=guessed
1.91      bertrand  264: LIBS="-lrt -lpthread"
1.1       bertrand  265: [AC_MSG_CHECKING([for POSIX semaphores and shared objects])
1.23      bertrand  266: AC_LINK_IFELSE(
1.1       bertrand  267: [AC_LANG_PROGRAM([#include <sys/mman.h>
                    268: #include <sys/stat.h>
                    269: #include <fcntl.h>
                    270:  ],
                    271: [ int fd; char *sem = "/test";
                    272: fd = shm_open(sem , O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
                    273:   close(fd);
                    274:   shm_unlink(sem);
                    275:   fd = sem_open(sem, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
                    276:   close(fd);
                    277:   sem_unlink(sem);
                    278:   return(0);
                    279: ])],
                    280: [IPCS_SYSV=-UIPCS_SYSV; AC_MSG_RESULT(yes)],
                    281: [IPCS_SYSV=-DIPCS_SYSV; AC_MSG_RESULT(no)]
                    282:    )]
1.91      bertrand  283: LIBS=$REG
1.1       bertrand  284: )
                    285: 
1.3       bertrand  286: if test "$IPCS_SYSV" = "-UIPCS_SYSV" -a "$POSIX_IPCS" = "guessed"; then
1.91      bertrand  287: REG=$LIBS
                    288: LIBS=-pthread
1.1       bertrand  289: AC_MSG_CHECKING([for POSIX anonymous semaphores])
1.23      bertrand  290: AC_LINK_IFELSE(
1.1       bertrand  291: [AC_LANG_PROGRAM([#include <semaphore.h>
                    292:  ],
                    293: [ sem_t sem;
                    294:  if (sem_init(&sem, 1, 0) != 0) return(1);
                    295:  sem_destroy(&sem);
                    296:   return(0);
                    297: ])],
                    298: [SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES; AC_MSG_RESULT(yes)],
                    299: [SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES; AC_MSG_RESULT(no)]
                    300:    )
1.91      bertrand  301: LDFLAGS=$LIBS
1.228     bertrand  302: LIBS=$REG
1.1       bertrand  303: else
                    304:    SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES
                    305: fi
                    306: 
                    307: AC_ARG_ENABLE(full-static,
                    308: [  --enable-full-static    build static RPL/2 engine [[default=shared]]], [
                    309: if test "$enableval" = "no"; then
                    310:    STATIC=no
                    311: else
                    312:    STATIC=yes
                    313: fi],
                    314: STATIC=no)
                    315: 
                    316: AC_ARG_ENABLE(final-encoding,
                    317: [  --enable-final-encoding force final encoding [[default=guessed]]], [
                    318: if test "$enableval" = "no"; then
                    319:    FINAL_ENCODING="\$(shell locale charmap | \
                    320:        \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')"
                    321:    FORCED_FINAL_ENCODING=0
                    322: else
                    323:    FINAL_ENCODING="$enable_final_encoding"
                    324:    FORCED_FINAL_ENCODING=1
                    325: fi], [
                    326: FORCED_FINAL_ENCODING=0
                    327: FINAL_ENCODING="\$(shell locale charmap | \
                    328:    \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')"])
                    329: 
                    330: AC_ARG_ENABLE(tex,
                    331: [  --enable-tex            provide the TeX support [[default=guessed]]], [
                    332: if test "$enableval" = "no"; then
                    333:    TEX_SUPPORT=no
                    334: else
                    335:    TEX_SUPPORT=yes
                    336: fi],
                    337: TEX_SUPPORT=guessed)
                    338: 
                    339: AC_ARG_ENABLE(vim,
                    340: [  --enable-vim            provide the vim support [[default=guessed]]], [
                    341: if test "$enableval" = "no"; then
                    342:    VIM_SUPPORT=no
1.16      bertrand  343:    DEBVIM=
1.1       bertrand  344: else
                    345:    VIM_SUPPORT=yes
1.17      bertrand  346:    DEBVIM=", vim"
1.1       bertrand  347: fi],
                    348: VIM_SUPPORT=guessed)
                    349: 
                    350: AC_ARG_ENABLE(embedded-gnuplot,
                    351: [  --enable-embedded-gnuplot build gnuplot provided by this package [[default=yes]]], [
                    352: if test "$enableval" = "no"; then
                    353:    MYGNUPLOT=no
                    354: else
                    355:    MYGNUPLOT=yes
                    356: fi], [
                    357: MYGNUPLOT=yes])
                    358: 
                    359: AC_ARG_ENABLE(gnuplot,
                    360: [  --enable-gnuplot        provide the GnuPlot support [[default=guessed]]],
                    361: [
                    362: if test "$enableval" = "no"; then
                    363:    GNUPLOT_SUPPORT=no
                    364:    MYGNUPLOT=no
                    365:    FORCE_GNUPLOT_PATH=-UFORCE_GNUPLOT_PATH
                    366: else
                    367:    GNUPLOT_SUPPORT=yes
                    368:    FORCE_GNUPLOT_PATH=-DFORCE_GNUPLOT_PATH
                    369: fi], [
                    370: if test "$MYGNUPLOT" = "yes"; then
                    371:    GNUPLOT_SUPPORT=yes
                    372:    FORCE_GNUPLOT_PATH=-DFORCE_GNUPLOT_PATH
                    373: else
                    374:    GNUPLOT_SUPPORT=guessed
                    375:    FORCE_GNUPLOT_PATH=-UFORCE_GNUPLOT_PATH
                    376: fi])
                    377: 
                    378: libX=""
                    379: LIBMOTIF=""
                    380: INCMOTIF=""
                    381: BUILD_OPENMOTIF=""
1.197     bertrand  382: MODULE_MOTIF=""
1.1       bertrand  383: 
                    384: AC_ARG_ENABLE(motif,
                    385: [  --enable-motif          provide the Motif support [[default=guessed]]], [
                    386: if test "$enableval" = "no"; then
                    387:    MOTIF_SUPPORT="-UMOTIF_SUPPORT"
                    388: else
                    389:    MOTIF_SUPPORT="-DMOTIF_SUPPORT"
                    390: fi],
1.92      bertrand  391: if test "$have_x" = "yes"; then
1.1       bertrand  392:    MOTIF_SUPPORT="-DMOTIF_SUPPORT"
                    393: else
                    394:    MOTIF_SUPPORT="-UMOTIF_SUPPORT"
                    395: fi)
                    396: 
                    397: if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then
1.201     bertrand  398:    libX="$X_LIBS -lXt -lX11 -lXext -lXinerama"
1.198     bertrand  399:    LIBMOTIF="\$(top_builddir)/tools/$OPENMOTIF/install/lib/libXm.a \
1.1       bertrand  400:            \$(top_builddir)/tools/$LIBXPM/src/.libs/libXpm.a"
                    401:    INCMOTIF="-I\$(top_srcdir)/tools/$OPENMOTIF/lib \
                    402:            -I\$(top_builddir)/tools/$OPENMOTIF/lib \
1.8       bertrand  403:            -I\$(top_srcdir)/tools/$LIBXPM/include"
1.1       bertrand  404:    BUILD_OPENMOTIF="$LIBXPM $OPENMOTIF"
1.6       bertrand  405: 
                    406:    if test $RECURSIVE = yes; then
                    407:        AC_CONFIG_SUBDIRS(tools/$LIBXPM)
                    408:        AC_CONFIG_SUBDIRS(tools/$OPENMOTIF)
                    409:    fi;
1.197     bertrand  410: 
                    411:    MODULE_MOTIF="modules/motif"
1.1       bertrand  412: fi
                    413: 
                    414: AC_ARG_ENABLE(experimental,
                    415: [  --enable-experimental   enable experimental code [[default=no]]], [
                    416: if test "$enableval" = "no"; then
                    417:    EXPERIMENTAL_CODE="-UEXPERIMENTAL_CODE"
                    418: else
                    419:    EXPERIMENTAL_CODE="-DEXPERIMENTAL_CODE"
                    420: fi],
                    421: EXPERIMENTAL_CODE="-UEXPERIMENTAL_CODE")
                    422: 
                    423: AC_ARG_ENABLE(debug,
                    424: [  --enable-debug          enable debug code [[default=no]]], [
                    425: if test "$enableval" = "no"; then
                    426:    DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS"
                    427: else
                    428:    DEBUG="-DDEBUG_MEMOIRE -UDEBUG_ERREURS"
                    429: fi], [DEBUG="-UDEBUG_MEMOIRE -UDEBUG_ERREURS"])
                    430: 
                    431: AC_ARG_ENABLE(profile,
                    432: [  --enable-profile        enable profile code [[default=no]]], [
                    433: if test "$enableval" = "no"; then
                    434:    PROFILAGE=""
                    435: else
                    436:    PROFILAGE="-pg"
                    437: fi], [PROFILAGE=""])
                    438: 
                    439: AC_SUBST(PROFILAGE)
                    440: 
1.48      bertrand  441: dnl Checks for uuencode
                    442: AC_CHECK_PROG(UUENCODE, uuencode, yes, no)
                    443: if test "$UUENCODE" = no; then
                    444:    AC_MSG_ERROR([Can not find uuencode !])
                    445: fi
                    446: 
1.202     bertrand  447: dnl Checks for patch
                    448: AC_CHECK_PROG(PATCH, patch, yes, no)
                    449: if test "$PATCH" = no; then
                    450:    AC_MSG_ERROR([Can not find patch !])
                    451: fi
                    452: 
1.1       bertrand  453: if test ! -d tools; then
                    454:    mkdir tools
                    455: fi
                    456: if test ! -d "$srcdir"/tools/$NCURSES; then
                    457:    gunzip -c "$srcdir"/tools/$NCURSES.tar.gz | \
                    458:            (cd "$srcdir/tools" && tar -xf -)
                    459:    (cd "$srcdir/tools/"$NCURSES && \
1.191     bertrand  460:            for i in $(ls ../$NCURSES*.sh.gz);
                    461:            do echo Uncompressing script $i; TMP=$i; gunzip -c $i > ${TMP%.*};
1.13      bertrand  462:            done;
1.191     bertrand  463:            for i in $(ls ../$NCURSES*.sh);
1.24      bertrand  464:            do echo Applying script $i && chmod 775 $i && ./$i;
1.13      bertrand  465:            done;
1.191     bertrand  466:            for i in $(ls ../$NCURSES*.patch.gz);
1.98      bertrand  467:            do echo Applying patch $i && \
                    468:                gunzip -c $i | patch -p1;
1.1       bertrand  469:            done);
                    470: fi
                    471: if test ! -d "$srcdir"/tools/$READLINE; then
                    472:    gunzip -c "$srcdir"/tools/$READLINE.tar.gz | \
                    473:            (cd "$srcdir/tools" && tar -xf -)
                    474: fi
                    475: if test ! -d "$srcdir"/tools/$UNITS; then
                    476:    gunzip -c "$srcdir"/tools/$UNITS.tar.gz | \
                    477:            (cd "$srcdir/tools" && tar -xf -)
                    478: fi
                    479: if test ! -d "$srcdir"/tools/$GSL; then
                    480:    gunzip -c "$srcdir"/tools/$GSL.tar.gz | \
                    481:            (cd "$srcdir/tools" && tar -xf -)
                    482:    if test $(uname) = "OS/2"; then
                    483:        (cd "$srcdir"/tools/$GSL; \
                    484:                TMP=$(mktemp tmp.XXXXXXXXXX); \
                    485:                sed -e '1,$s/\${1+"\$@"}/"\$@"/g' ltmain.sh > $TMP; \
                    486:                \mv -f $TMP ltmain.sh)
                    487:    fi
                    488: fi
                    489: if test ! -d "$srcdir"/tools/$GPP; then
                    490:    gunzip -c "$srcdir"/tools/$GPP.tar.gz | \
                    491:            (cd "$srcdir/tools" && tar -xf -)
                    492: fi
                    493: if test ! -d "$srcdir"/tools/$FILE; then
                    494:    gunzip -c "$srcdir"/tools/$FILE.tar.gz | \
                    495:            (cd "$srcdir/tools" && tar -xf - )
1.23      bertrand  496:    (cd "$srcdir/tools"/$FILE && gunzip -c ../$FILE.diff.gz | patch -p1 && \
                    497:            autoreconf)
1.1       bertrand  498: fi
                    499: if test ! -d "$srcdir"/tools/$SQLITE; then
                    500:    gunzip -c "$srcdir"/tools/$SQLITE.tar.gz | \
                    501:            (cd "$srcdir/tools" && tar -xf -)
                    502: fi
                    503: if test ! -d "$srcdir"/tools/$SIGSEGV; then
                    504:    gunzip -c "$srcdir"/tools/$SIGSEGV.tar.gz | \
                    505:            (cd "$srcdir/tools" && tar -xf -)
1.32      bertrand  506:    (cd "$srcdir/tools/$SIGSEGV" && ./autogen.sh --skip-gnulib)
1.1       bertrand  507: fi
1.36      bertrand  508: if test ! -d "$srcdir"/tools/$ICONV; then
                    509:    gunzip -c "$srcdir"/tools/$ICONV.tar.gz | \
                    510:            (cd "$srcdir/tools" && tar -xf -)
1.38      bertrand  511:    (cd "$srcdir"/tools/$ICONV && ln -sf ../$SIGSEGV/gnulib gnulib)
1.36      bertrand  512: fi
1.1       bertrand  513: if test ! -d "$srcdir"/tools/$OPENMOTIF; then
                    514:    gunzip -c "$srcdir"/tools/$OPENMOTIF.tar.gz | \
                    515:            (cd "$srcdir/tools" && tar -xf -)
                    516: fi
                    517: if test ! -d "$srcdir"/tools/$LIBXPM; then
                    518:    gunzip -c "$srcdir"/tools/$LIBXPM.tar.gz | \
                    519:            (cd "$srcdir/tools" && tar -xf -)
                    520: fi
                    521: if test ! -d tools/$OPENSSL; then
                    522:    gunzip -c "$srcdir"/tools/$OPENSSL.tar.gz | \
                    523:            (cd tools && tar -xf -)
                    524: fi
1.62      bertrand  525: if test ! -d tools/$ZLIB; then
                    526:    gunzip -c "$srcdir"/tools/$ZLIB.tar.gz | \
                    527:            (cd tools && tar -xf - && cd $ZLIB && ./configure --static)
                    528: fi
1.1       bertrand  529: if test ! -d rplcas; then
                    530:    mkdir rplcas
                    531: fi
                    532: if test ! -d "$srcdir"/rplcas/$GMP; then
                    533:    gunzip -c "$srcdir"/rplcas/$GMP.tar.gz | \
                    534:            (cd "$srcdir/rplcas" && tar -xf -)
                    535: fi
                    536: if test ! -d "$srcdir"/rplcas/$MPFR; then
                    537:    gunzip -c "$srcdir"/rplcas/$MPFR.tar.gz | \
                    538:            (cd "$srcdir/rplcas" && tar -xf -)
                    539: fi
1.137     bertrand  540: if test ! -d "$srcdir"/rplcas/$MPFI; then
                    541:    gunzip -c "$srcdir"/rplcas/$MPFI.tar.gz | \
                    542:            (cd "$srcdir/rplcas" && tar -xf -)
                    543: fi
1.1       bertrand  544: if test ! -d rplcas/$NTL; then
                    545:    gunzip -c "$srcdir"/rplcas/$NTL.tar.gz | \
                    546:            (cd rplcas && tar -xf -)
                    547: fi
                    548: if test ! -d rplcas/$COCOA; then
                    549:    gunzip -c "$srcdir"/rplcas/$COCOA.tar.gz | \
                    550:            (cd rplcas && tar -xf -)
                    551: fi
                    552: if test ! -d rplcas/$PARI; then
                    553:    gunzip -c "$srcdir"/rplcas/$PARI.tar.gz | \
                    554:            (cd rplcas && tar -xf -)
                    555: fi
                    556: if test ! -d "$srcdir"/rplcas/$GIAC; then
                    557:    gunzip -c "$srcdir"/rplcas/$GIAC.tar.gz | \
                    558:            (cd "$srcdir/rplcas" && tar -xf -)
                    559: fi
                    560: 
                    561: touch tools/openmotif.lib
                    562: 
                    563: dnl Default installation directory
                    564: AC_PREFIX_DEFAULT(/usr/local)
                    565: 
                    566: dnl Set final install path
                    567: AC_ARG_ENABLE(final-run-path,
                    568:              [  --enable-final-run-path=PATH enable another final run path than PREFIX], [
                    569:    if test "x$enable_final_run_path" = "x"; then
                    570:        AC_MSG_NOTICE("No path with --enable-final-run-path.")
                    571:        AC_MSG_ERROR("You should specify final path !")
                    572:    else
                    573:        RUNPATH="$enable_final_run_path"
                    574:    fi
                    575: ],
                    576: RUNPATH="\${prefix}"
                    577: )
                    578: AC_SUBST(RUNPATH)
                    579: 
                    580: dnl Checks for programs
                    581: AC_PROG_INSTALL
                    582: AC_PROG_LN_S
                    583: AC_PROG_MAKE_SET
                    584: AC_PROG_RANLIB
                    585: 
                    586: dnl Checks for nawk
                    587: AC_CHECK_PROG(AWK, nawk, yes, no)
                    588: if test "$AWK" = no; then
                    589:    AC_CHECK_PROG(AWK, gawk, yes, no)
                    590:    if test "$AWK" = no; then
                    591:        AC_MSG_ERROR([Can not find nawk !])
                    592:    fi
                    593: fi
                    594: 
                    595: dnl Checks for sed
                    596: AC_CHECK_PROG(SED, sed, yes, no)
                    597: if test "$SED" = no; then
                    598:    AC_MSG_ERROR([Can not find sed !])
                    599: fi
                    600: 
1.48      bertrand  601: dnl Checks for yacc
                    602: AC_CHECK_PROG(YACC, yacc, yes, no)
                    603: if test "$YACC" = no; then
                    604:    AC_MSG_ERROR([Can not find yacc !])
                    605: fi
                    606: 
1.1       bertrand  607: dnl Checks for TeX, LaTeX, dvips, gs, gv, vim and gnuplot
                    608: if test "$TEX_SUPPORT" = guessed; then
                    609:    POSTSCRIPT_SUPPORT="-DPOSTSCRIPT_SUPPORT"
                    610: 
                    611:    AC_CHECK_PROG(TEX, tex, yes, no)
                    612:    if test "$TEX" = no; then
                    613:        AC_MSG_WARN([Cannot find TeX! You may install it.
                    614: Download at http://tex.loria.fr/
                    615: ])
                    616:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    617:    fi
                    618: 
                    619:    AC_CHECK_PROG(LATEX, latex, yes, no)
                    620:    if test "$LATEX" = no; then
                    621:        AC_MSG_WARN([Cannot find LaTeX! You may install it.
                    622: Download at http://tex.loria.fr/
                    623: ])
                    624:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    625:    fi
                    626: 
                    627:    AC_CHECK_PROG(DVIPS, dvips, yes, no)
                    628:    if test "$DVIPS" = no; then
                    629:        AC_MSG_WARN([Cannot find dvips! You may install it.
                    630: Download at http://tex.loria.fr/
                    631: ])
                    632:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    633:    fi
                    634: 
                    635:    AC_CHECK_PROG(GS, gs, yes, no)
                    636:    if test "$GS" = no; then
                    637:        AC_MSG_WARN([Cannot find gs! You may install it.
                    638: Download at http://ftp.lip6.fr/
                    639: ])
                    640:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    641:    fi
                    642: 
                    643:    AC_CHECK_PROG(GV, gv, yes, no)
                    644:    if test "$GV" = no; then
                    645:        AC_MSG_WARN([Cannot find gv! You may install it.
                    646: Download at http://ftp.lip6.fr/
                    647: ])
                    648:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    649:    fi
                    650: else
                    651:    if test "$TEX_SUPPORT" = no; then
                    652:        POSTSCRIPT_SUPPORT="-UPOSTSCRIPT_SUPPORT"
                    653:    else
                    654:        POSTSCRIPT_SUPPORT="-DPOSTSCRIPT_SUPPORT"
                    655:    fi
                    656: fi
                    657: 
                    658: if test "$GNUPLOT_SUPPORT" = guessed; then
                    659:    AC_CHECK_PROG(GNUPLOT_P, gnuplot, yes, no)
                    660:    if test "$GNUPLOT_P" = no; then
                    661:        AC_MSG_WARN([Cannot find gnuplot! You may install it.
                    662: Download at http://www.gnuplot.vt.edu/
                    663: ])
                    664:        GNUPLOT_SUPPORT="-UGNUPLOT_SUPPORT"
                    665:    else
                    666:        GNUPLOT_SUPPORT="-DGNUPLOT_SUPPORT"
                    667:    fi
                    668: else
                    669:    if test "$GNUPLOT_SUPPORT" = no; then
                    670:        GNUPLOT_SUPPORT="-UGNUPLOT_SUPPORT"
                    671:    else
                    672:        GNUPLOT_SUPPORT="-DGNUPLOT_SUPPORT"
                    673:    fi
                    674: fi
                    675: 
                    676: if test "$VIM_SUPPORT" = guessed; then
                    677:    AC_CHECK_PROG(VIM, vim, yes, no)
                    678:    if test "$VIM" = no; then
                    679:        AC_MSG_WARN([Cannot find vim! You may install it.
                    680: Download at http://www.vim.org/
                    681: ])
                    682:        VIM_SUPPORT="-UVIM_SUPPORT"
1.16      bertrand  683:        DEBVIM=
1.1       bertrand  684:    else
                    685:        VIM_SUPPORT="-DVIM_SUPPORT"
1.18      bertrand  686:        DEBVIM=", vim"
1.1       bertrand  687:    fi
                    688: else
                    689:    if test "$VIM_SUPPORT" = no; then
                    690:        VIM_SUPPORT="-UVIM_SUPPORT"
1.16      bertrand  691:        DEBVIM=
1.1       bertrand  692:    else
                    693:        VIM_SUPPORT="-DVIM_SUPPORT"
1.18      bertrand  694:        DEBVIM=", vim"
1.1       bertrand  695:    fi
                    696: fi
                    697: 
                    698: dnl Substitutions
                    699: AC_SUBST(GNUPLOT_SUPPORT)
                    700: AC_SUBST(FORCE_GNUPLOT_PATH)
                    701: AC_SUBST(POSTSCRIPT_SUPPORT)
                    702: AC_SUBST(VIM_SUPPORT)
                    703: AC_SUBST(EXPERIMENTAL_CODE)
                    704: AC_SUBST(DEBUG)
                    705: AC_SUBST(MOTIF_SUPPORT)
                    706: AC_SUBST(libX)
                    707: AC_SUBST(includeX)
                    708: 
                    709: dnl Date
1.124     bertrand  710: DATE=$(env LC_ALL=C date +"%A, %e %B %Y %T %z")
                    711: DATE_FR=$(env LC_ALL=fr_FR date +"%A, %e %B %Y %T %z")
1.1       bertrand  712: AC_SUBST(DATE)
1.124     bertrand  713: AC_SUBST(DATE_FR)
1.1       bertrand  714: 
                    715: dnl Checks for libraries
                    716: AC_CHECK_LIB(m, main,, AC_MSG_ERROR([Can not find libm !]))
1.2       bertrand  717: AC_CHECK_LIB(c, pthread_mutex_init,,
                    718:             [AC_CHECK_LIB(pthread, main,,
                    719:             AC_MSG_ERROR([Can not find libpthread !]))])
1.201     bertrand  720: if test "$MOTIF_SUPPORT" = "-DMOTIF_SUPPORT"; then
                    721:    AC_CHECK_LIB(Xinerama, XineramaIsActive,,
                    722:                 AC_MSG_ERROR([Can not find libXinerama !]))
                    723: fi
1.203     bertrand  724: AC_CHECK_LIB(gomp, omp_get_num_procs,, AC_MSG_ERROR([Can not find libgomp !]))
1.204     bertrand  725: OPENMP=-lgomp
1.203     bertrand  726: AC_SUBST(OPENMP)
1.1       bertrand  727: 
                    728: dnl Check for union semun
                    729: AC_CHECK_TYPE([union semun], SEMUN=-DUNION_SEMUN, SEMUN=-UUNION_SEMUN, [[
                    730: #include <sys/sem.h>
                    731: ]])
                    732: 
                    733: dnl Check for IPv6 support
                    734: AC_CHECK_TYPE([struct sockaddr_in6], IPV6=-DIPV6, IPV6=-UIPV6, [[
                    735: #include <sys/types.h>
                    736: #include <netinet/in.h>
                    737: ]])
                    738: 
                    739: dnl Do we need to use -ldl?
                    740: if test "$CYGWIN" != yes; then
                    741:    AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl",
                    742:            AC_MSG_WARN([libdl doesn't seem to be needed on this system.]))
                    743: fi
                    744: 
                    745: dnl Do we need to use -lrt?
                    746: AC_CHECK_LIB(rt, nanosleep, LIBS="$LIBS -lrt",
                    747:        AC_MSG_WARN([librt doesn't seem to be needed on this system.]))
                    748: 
1.79      bertrand  749: AC_CHECK_LIB(rt, shm_open, LIBS="$LIBS -lrt",
                    750:        AC_MSG_WARN([librt doesn't seem to be needed on this system.]))
                    751: 
                    752: AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread",
                    753:        AC_MSG_WARN([libpthread doesn't seem to be needed on this system.]))
                    754: 
1.1       bertrand  755: dnl Do we need to use -lsocket?
                    756: AC_CHECK_LIB(socket, bind, LIBS="$LIBS -lsocket",
                    757:        AC_MSG_WARN([libsocket doesn't seem to be needed on this system.]))
                    758: 
                    759: dnl Check for SQL libraries
                    760: MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    761: AC_ARG_WITH(mysql,
                    762: [  --with-mysql=PATH         specify directory for installed mysql],
                    763: [], [with_mysql=check])
                    764: 
1.162     bertrand  765: if test "x$with_mysql" = xcheck -o "x$with_mysql" = xyes; then
1.1       bertrand  766:    libMySQLinc="-I/usr/include"
                    767:    libMySQLlib="/usr/lib"
                    768: 
                    769:    AC_MSG_CHECKING(for libmysql includes in /usr/include)
                    770:    saved_CFLAGS="$CFLAGS"
                    771:    CFLAGS="$CFLAGS -L/$libMySQLinc"
                    772:    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    773:                    libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    774:    CFLAGS=$saved_CFLAGS
                    775: 
                    776:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    777:        AC_MSG_CHECKING(for libmysql includes in /usr/include/mysql)
                    778:        saved_CFLAGS="$CFLAGS"
                    779:        CFLAGS="$CFLAGS $libMySQLinc/mysql"
                    780:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    781:                        libMySQLinc=$libMySQLinc],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    782:        CFLAGS=$saved_CFLAGS
                    783:        libMySQLinc=$libMySQLinc/mysql
                    784:    fi
                    785: 
                    786:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    787:        AC_MSG_CHECKING(for libmysql includes in /usr/local/include)
                    788:        saved_CFLAGS="$CFLAGS"
                    789:        CFLAGS="$CFLAGS $libMySQLinc/../local/include"
                    790:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    791:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    792:        CFLAGS=$saved_CFLAGS
                    793:        libMySQLinc=$libMySQLinc/../local/include
                    794:        libMySQLlib=$libMySQLlib/../local/lib
                    795:    fi
                    796: 
                    797:    if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    798:        AC_MSG_CHECKING(for libmysql includes in /usr/local/include/mysql)
                    799:        saved_CFLAGS="$CFLAGS"
                    800:        CFLAGS="$CFLAGS $libMySQLinc/../local/include/mysql"
                    801:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    802:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    803:        CFLAGS=$saved_CFLAGS
                    804:        libMySQLinc=$libMySQLinc/../local/include/mysql
                    805:        libMySQLlib=$libMySQLlib/../local/lib
                    806:    fi
                    807: else
                    808:    if test "x$with_mysql" != xno; then
                    809:        libMySQLinc="-I$with_mysql/include"
                    810:        libMySQLlib="$with_mysql/lib"
                    811: 
                    812:        AC_MSG_CHECKING(for libmysql includes in $with_mysql)
                    813:        saved_CFLAGS="$CFLAGS"
                    814:        CFLAGS="$CFLAGS $libMySQLinc"
                    815:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    816:                        libMySQLinc=$libMySQLinc/mysql],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    817:        CFLAGS=$saved_CFLAGS
                    818: 
                    819:        if test "$MYSQL_SUPPORT" = "-UMYSQL_SUPPORT"; then
                    820:            AC_MSG_CHECKING(for libmysql includes in $with_mysql/mysql)
                    821:            saved_CFLAGS="$CFLAGS"
                    822:            CFLAGS="$CFLAGS $libMySQLinc/mysql"
                    823:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[]])],[AC_MSG_RESULT([yes]); MYSQL_SUPPORT="-DMYSQL_SUPPORT";
                    824:                            libMySQLinc=$libMySQLinc],[AC_MSG_RESULT([no]); MYSQL_SUPPORT="-UMYSQL_SUPPORT"])
                    825:            CFLAGS=$saved_CFLAGS
                    826:            libMySQLinc=$libMySQLinc/mysql
                    827:        fi
                    828:    else
                    829:        MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    830:    fi
                    831: fi
                    832: 
                    833: if test "$MYSQL_SUPPORT" = "-DMYSQL_SUPPORT"; then
                    834:    MYSQL_LIB=no
                    835: 
                    836:    if test $MYSQL_LIB = no; then
                    837:        AC_MSG_CHECKING(for libmysql libraries in $libMySQLlib)
                    838:        saved_LIBS="$LIBS"
                    839:        if test $STATIC = no; then
                    840:            LIBS="$LIBS -L/$libMySQLlib -lmysqlclient_r $libMySQLinc"
                    841:        else
1.86      bertrand  842:            LIBS="$LIBS $libMySQLlib/libmysqlclient_r.a $libMySQLinc"
1.1       bertrand  843:        fi
                    844:        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "mysql.h"]], [[MYSQL mysql; mysql_init(&mysql);]])],[AC_MSG_RESULT([yes]); MYSQL_LIB="yes"],[AC_MSG_RESULT([no]); MYSQL_LIB="no"])
                    845:        LIBS=$saved_LIBS;
                    846:        if test $STATIC = no; then
                    847:            libMySQLlib="-L/$libMySQLlib -lmysqlclient_r"
                    848:        else
                    849:            libMySQLlib="$libMySQLlib/libmysqlclient_r.a"
                    850:            EXT_SQL="$EXT_SQL $libMySQLlib"
                    851:        fi
                    852:    fi
                    853: 
                    854:    if test $MYSQL_LIB = no; then
                    855:        MYSQL_SUPPORT="-UMYSQL_SUPPORT"
                    856:    fi
                    857: fi
                    858: 
1.16      bertrand  859: DEBMYSQL=
                    860: 
1.1       bertrand  861: if test "$MYSQL_SUPPORT" != "-DMYSQL_SUPPORT"; then
                    862:    libMySQLinc=
                    863:    libMySQLlib=
1.16      bertrand  864: else
1.17      bertrand  865:    DEBMYSQL=", libmysqlclient18"
1.1       bertrand  866: fi
                    867: 
                    868: AC_SUBST(MYSQL_SUPPORT)
                    869: AC_SUBST(libMySQLinc)
                    870: AC_SUBST(libMySQLlib)
                    871: 
                    872: POSTGRESQL_SUPPORT=-UPOSTGRESQL_SUPPORT
                    873: AC_ARG_WITH(postgresql,
                    874: [  --with-postgresql=PATH    specify directory for installed postgresql],
                    875: [], [with_postgresql=check])
                    876: 
                    877: # with_postgresql : check [pas défini], yes [uniquement --with],
                    878: # no [--without], valeur [--with=valeur].
                    879: 
                    880: if test "x$with_postgresql" = xcheck -o "x$with_postgresql" = xyes; then
                    881:    libPgSQLinc="-I/usr/include"
                    882:    libPgSQLlib="/usr/lib"
                    883: 
                    884:    AC_MSG_CHECKING(for libpq includes in /usr/include)
                    885:    saved_CFLAGS="$CFLAGS"
                    886:    CFLAGS="$CFLAGS $libPgSQLinc"
                    887:    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]); POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]); POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    888:    CFLAGS=$saved_CFLAGS
                    889: 
                    890:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    891:        AC_MSG_CHECKING(for libpq includes in /usr/include/postgresql)
                    892:        saved_CFLAGS="$CFLAGS"
                    893:        CFLAGS="$CFLAGS $libPgSQLinc/postgresql"
                    894:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    895:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    896:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    897:        CFLAGS=$saved_CFLAGS
                    898:        libPgSQLinc=$libPgSQLinc/postgresql
                    899:    fi
                    900: 
                    901:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    902:        AC_MSG_CHECKING(for libpq includes in /usr/include/pgsql)
                    903:        saved_CFLAGS="$CFLAGS"
                    904:        CFLAGS="$CFLAGS $libPgSQLinc/pgsql"
                    905:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    906:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    907:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    908:        CFLAGS=$saved_CFLAGS
                    909:        libPgSQLinc=$libPgSQLinc/pgsql
                    910:    fi
                    911: 
                    912:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    913:        AC_MSG_CHECKING(for libpq includes in /usr/local/include)
                    914:        saved_CFLAGS="$CFLAGS"
                    915:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include"
                    916:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    917:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    918:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    919:        CFLAGS=$saved_CFLAGS
                    920:        libPgSQLinc=$libPgSQLinc/../local/include
                    921:        libPgSQLlib=$libPgSQLlib/../local/lib
                    922:    fi
                    923: 
                    924:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    925:        AC_MSG_CHECKING(for libpq includes in /usr/local/include/postgresql)
                    926:        saved_CFLAGS="$CFLAGS"
                    927:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include/postgresql"
                    928:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    929:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    930:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    931:        CFLAGS=$saved_CFLAGS
                    932:        libPgSQLinc=$libPgSQLinc/../local/include/postgresql
                    933:        libPgSQLlib=$libPgSQLlib/../local/lib
                    934:    fi
                    935: 
                    936:    if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    937:        AC_MSG_CHECKING(for libpq includes in /usr/local/include/pgsql)
                    938:        saved_CFLAGS="$CFLAGS"
                    939:        CFLAGS="$CFLAGS $libPgSQLinc/../local/include/pgsql"
                    940:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    941:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    942:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    943:        CFLAGS=$saved_CFLAGS
                    944:        libPgSQLinc=$libPgSQLinc/local/include/pgsql
                    945:        libPgSQLlib=$libPgSQLlib/../local/lib
                    946:    fi
                    947: else
                    948:    if test "x$with_postgresql" != xno; then
                    949:        libPgSQLinc="-I$with_postgresql/include"
                    950:        libPgSQLlib="$with_postgresql/lib"
                    951: 
                    952:        AC_MSG_CHECKING(for libpq includes in $libPgSQLinc)
                    953:        saved_CFLAGS="$CFLAGS"
                    954:        CFLAGS="$CFLAGS $libPgSQLinc"
                    955:        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    956:                POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    957:                POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    958:        CFLAGS=$saved_CFLAGS
                    959: 
                    960:        if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    961:            AC_MSG_CHECKING(for libpq includes in $libPgSQLinc/postgresql)
                    962:            saved_CFLAGS="$CFLAGS"
                    963:            CFLAGS="$CFLAGS $libPgSQLinc/postgresql"
                    964:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    965:                    POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    966:                    POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    967:            CFLAGS=$saved_CFLAGS
                    968:            libPgSQLinc=$libPgSQLinc/postgresql
                    969:        fi
                    970: 
                    971:        if test "$POSTGRESQL_SUPPORT" = "-UPOSTGRESQL_SUPPORT"; then
                    972:            AC_MSG_CHECKING(for libpq includes in $libPgSQLinc/pgsql)
                    973:            saved_CFLAGS="$CFLAGS"
                    974:            CFLAGS="$CFLAGS $libPgSQLinc/pgsql"
                    975:            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[]])],[AC_MSG_RESULT([yes]);
                    976:                    POSTGRESQL_SUPPORT="-DPOSTGRESQL_SUPPORT"],[AC_MSG_RESULT([no]);
                    977:                    POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"])
                    978:            CFLAGS=$saved_CFLAGS
                    979:            libPgSQLinc=$libPgSQLinc/pgsql
                    980:        fi
                    981:    else
                    982:        POSTGRESQL_SUPPORT="-UPOSTGRESQL_SUPPORT"
                    983:    fi
                    984: fi
                    985: 
                    986: if test "$POSTGRESQL_SUPPORT" = "-DPOSTGRESQL_SUPPORT"; then
                    987:    POSTGRESQL_LIB=no
                    988: 
                    989:    if test $POSTGRESQL_LIB = no; then
                    990:        AC_MSG_CHECKING(for libpq libraries in $libPgSQLlib)
                    991:        saved_LIBS="$LIBS"
                    992:        if test $STATIC = no; then
                    993:            LIBS="$LIBS -L/$libPgSQLlib $libPgSQLinc -lpq"
                    994:        else
                    995:            LIBS="$LIBS $libPgSQLlib/libpq.a $libPgSQLinc"
                    996:        fi
                    997:        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "libpq-fe.h"]], [[PGconn *conn; const char *conninfo="dbname=postgres"; conn =
                    998:             PQconnectdb(conninfo);]])],[AC_MSG_RESULT([yes]); POSTGRESQL_LIB="yes"],[AC_MSG_RESULT([no]); POSTGRESQL_LIB="no"])
                    999:        LIBS=$saved_LIBS;
                   1000:        if test $STATIC = no; then
                   1001:            libPgSQLlib="-L/$libPgSQLlib -lpq"
                   1002:        else
                   1003:            libPgSQLlib="$libPgSQLlib/libpq.a"
                   1004:            EXT_SQL="$EXT_SQL $libPgSQLlib"
                   1005:        fi
                   1006:    fi
                   1007: fi
                   1008: 
1.16      bertrand 1009: DEBPQ=
                   1010: 
1.1       bertrand 1011: if test "$POSTGRESQL_SUPPORT" != "-DPOSTGRESQL_SUPPORT"; then
                   1012:    libPgSQLinc=
                   1013:    libPgSQLlib=
1.16      bertrand 1014: else
1.17      bertrand 1015:    DEBPQ=", libpq5"
1.1       bertrand 1016: fi
                   1017: 
                   1018: AC_SUBST(POSTGRESQL_SUPPORT)
                   1019: AC_SUBST(libPgSQLinc)
                   1020: AC_SUBST(libPgSQLlib)
                   1021: 
                   1022: # with_postgresql : check [pas défini], yes [uniquement --with],
                   1023: # no [--without], valeur [--with=valeur].
                   1024: AC_ARG_WITH(bourne_shell,
                   1025: [  --with-bourne-shell=PATH  specify path for OS/2 bourne shell],
                   1026: [], [with_bourne_shell=no])
                   1027: 
                   1028: if test "x$with_bourne_shell" = xyes; then
                   1029:    AC_MSG_ERROR([You have to specify a valide shell path !])
                   1030: fi
                   1031: 
                   1032: if test "x$with_bourne_shell" = xno; then
                   1033:    if test $(uname) = "OS/2"; then
                   1034:        AC_MSG_ERROR([With OS/2 or eComstation, you have to specify a valide
                   1035: shell path with --with-bourne-shell=PATH !])
                   1036:    fi
                   1037: 
                   1038:    BSH_PATH=
                   1039: else
                   1040:    if test ! -x $with_bourne_shell; then
                   1041:        AC_MSG_ERROR([$with_bourne_shell is not executable !])
                   1042:    fi
                   1043: 
                   1044:    if test $(uname) = "OS/2"; then
                   1045:        with_os2_bourne_shell=$(echo $with_bourne_shell | \
                   1046:                sed -e '1,$s/\//\\\\\\\\/g')
                   1047:        BSH_PATH=-DBOURNE_SHELL=\"\\\"$with_os2_bourne_shell\\\"\"
                   1048:    else
                   1049:        AC_MSG_WARN([--with-bourne-shell ignored])
                   1050:        BSH_PATH=
                   1051:    fi
                   1052: fi
                   1053: 
                   1054: dnl Checks for sizes
                   1055: AC_CHECK_SIZEOF(void *, 4)
                   1056: AC_CHECK_SIZEOF(char, 1)
                   1057: AC_CHECK_SIZEOF(short int, 2)
                   1058: AC_CHECK_SIZEOF(int, 4)
                   1059: AC_CHECK_SIZEOF(long int, 4)
                   1060: AC_CHECK_SIZEOF(long long int, 8)
                   1061: AC_CHECK_SIZEOF(float, 4)
                   1062: AC_CHECK_SIZEOF(double, 8)
                   1063: AC_CHECK_SIZEOF(long double, 12)
                   1064: 
                   1065: dnl Checks for header files.
                   1066: AC_HEADER_DIRENT
                   1067: AC_HEADER_STDC
                   1068: AC_HEADER_SYS_WAIT
                   1069: AC_CHECK_HEADERS(dlfcn.h fcntl.h math.h pwd.h signal.h string.h termios.h \
                   1070:        time.h unistd.h sys/resource.h sys/stat.h sys/time.h sys/timeb.h \
                   1071:        sys/types.h sys/select.h sys/wait.h stdio.h stdlib.h pthread.h)
                   1072: 
                   1073: dnl Checks for typedefs, structures, and compiler characteristics.
                   1074: AC_C_CONST
                   1075: AC_TYPE_UID_T
                   1076: AC_TYPE_PID_T
                   1077: AC_TYPE_SIZE_T
                   1078: AC_HEADER_TIME
                   1079: AC_STRUCT_TM
                   1080: 
                   1081: dnl Checks for library functions.
                   1082: AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
                   1083: Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
                   1084: AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
                   1085: [AC_LANG_PROGRAM([#include <sys/types.h>
                   1086: #include <signal.h>
                   1087: ],
                   1088:         [return *(signal (0, 0)) (0) == 1;])],
                   1089:           [ac_cv_type_signal=int],
                   1090:           [ac_cv_type_signal=void])])
                   1091: AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
                   1092:            (`int' or `void').])
                   1093: 
                   1094: AC_FUNC_STRCOLL
                   1095: AC_FUNC_STRFTIME
                   1096: AC_FUNC_VPRINTF
                   1097: AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \
                   1098:        strerror strspn strstr strtod)
                   1099: 
                   1100: dnl Check for OpenSSL os/comp
                   1101: AC_ARG_WITH(openssl_arch,
                   1102: [  --with-openssl-arch=ARCH  specify os and compiler for openssl (ARCH or list)],
                   1103: [], [with_openssl_arch=none])
                   1104: 
                   1105: if test $(uname) = "OS/2"; then
                   1106:    bash -c "cd tools/$OPENSSL && os2/OS2-EMX.cmd"
                   1107: else
1.23      bertrand 1108:    if test $build = $host; then
                   1109:        OPENSSL_CROSS=
                   1110:    else
                   1111:        OPENSSL_CROSS="AR=$host-ar RANLIB=$host-ranlib CC=$host-gcc NM=$host-nm"
                   1112:    fi
                   1113:    echo $build $host
                   1114:    echo $OPENSSL_CROSS
1.1       bertrand 1115:    if test "x$with_openssl_arch" = xnone; then
1.23      bertrand 1116:        (cd tools/$OPENSSL && sh -c "$OPENSSL_CROSS ./config no-asm")
1.1       bertrand 1117:    elif test "x$with_openssl_arch" = xyes -o "x$with_openssl_arch" = xno; then
                   1118:        (cd tools/$OPENSSL && ./Configure)
                   1119:        AC_MSG_ERROR([OS/COMP informations are required!])
                   1120:    elif test "x$with_openssl_arch" = xlist; then
                   1121:        (cd tools/$OPENSSL && ./Configure)
                   1122:        AC_MSG_ERROR([Please specify OS and Architecture])
                   1123:    else
1.23      bertrand 1124:        (cd tools/$OPENSSL && sh -c "$OPENSSL_CROSS ./Configure no-asm \
                   1125:                $with_openssl_arch")
1.1       bertrand 1126:    fi
                   1127: fi
                   1128: 
                   1129: if test "$MYGNUPLOT" = "yes"; then
                   1130:    if test ! -d "$srcdir"/tools/$GNUPLOT; then
                   1131:        gunzip -c "$srcdir"/tools/$GNUPLOT.tar.gz | \
                   1132:                (cd "$srcdir/tools" && tar -xf -)
                   1133:    fi
1.6       bertrand 1134: 
                   1135:    if test $RECURSIVE = yes; then
                   1136:        AC_CONFIG_SUBDIRS(tools/$GNUPLOT)
                   1137:    fi
                   1138: 
1.1       bertrand 1139:    GNUPLOT_COMPILATION=$GNUPLOT
                   1140: else
                   1141:    GNUPLOT_COMPILATION=
                   1142: fi
                   1143: 
                   1144: AC_SUBST(GNUPLOT_COMPILATION)
                   1145: 
1.3       bertrand 1146: HOST=$target
1.1       bertrand 1147: AC_SUBST(HOST)
1.25      bertrand 1148: BUILD=$build
                   1149: AC_SUBST(BUILD)
1.1       bertrand 1150: 
1.2       bertrand 1151: my_save_cflags="$CFLAGS"
                   1152: FPCFLAGS=""
1.1       bertrand 1153: 
1.2       bertrand 1154: CFLAGS=-malign-double
                   1155: AC_MSG_CHECKING([whether CC supports -malign-double])
                   1156: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1157:    [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -malign-double"],
                   1158:    [AC_MSG_RESULT([no])])
1.218     bertrand 1159: #CFLAGS=-mieee-fp
                   1160: #AC_MSG_CHECKING([whether CC supports -mieee-fp])
                   1161: #AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1162: #    [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -mieee-fp"],
                   1163: #  [AC_MSG_RESULT([no])])
1.2       bertrand 1164: CFLAGS=-mieee
                   1165: AC_MSG_CHECKING([whether CC supports -mieee])
                   1166: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
                   1167:     [AC_MSG_RESULT([yes]); FPCFLAGS="$FPCFLAGS -mieee"],
                   1168:    [AC_MSG_RESULT([no])])
                   1169: CFLAGS=$my_save_cflags
                   1170: 
                   1171: CFLAGS="$CFLAGS $FPCFLAGS -Wall -funsigned-char -Wno-pointer-sign"
                   1172: FFLAGS="$FFLAGS $FPCFLAGS -Wall -fno-f2c"
                   1173: FCFLAGS="$FCFLAGS $FPCFLAGS -Wall -fno-f2c"
                   1174: CXXFLAGS="$CXXFLAGS $FPCFLAGS -Wall -funsigned-char"
1.1       bertrand 1175: 
1.2       bertrand 1176: case $target_os in
1.1       bertrand 1177: 
                   1178:    cygwin*)
                   1179:        OS=Cygwin
                   1180:    break ;;
                   1181: 
                   1182:    interix*)
                   1183:        OS=Interix
                   1184:    break ;;
                   1185: 
                   1186:    *)
                   1187:        OS=$(uname)
                   1188:    break ;;
                   1189: 
                   1190: esac
                   1191: 
                   1192: AC_SUBST(OS)
                   1193: 
                   1194: MALLOC=
1.170     bertrand 1195: NO_EXPORT_DYNAMIC=-Wl,--no-export-dynamic
1.1       bertrand 1196: 
                   1197: case $OS in
                   1198:     Darwin)
                   1199:        EXPORT_DYNAMIC=-Wl,-flat_namespace
                   1200:        NESTED_FUNCTIONS=-fnested-functions
                   1201:        CXXFLAGS="$CXXFLAGS -D_GLIBCXX_FULLY_DYNAMIC_STRING"
                   1202:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1203:                --disable-shared --enable-static --enable-threads \
                   1204:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1205:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1206:                LDFLAGS=\"$LDFLAGS\""
                   1207:        C_STANDARD=-std=gnu99
                   1208:        ELF=
                   1209:    break ;;
                   1210: 
                   1211:     Cygwin)
                   1212:        EXPORT_DYNAMIC=-Wl,--export-all-symbols
                   1213:        NESTED_FUNCTIONS=
                   1214:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1215:                --disable-shared --enable-static --enable-threads \
                   1216:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1217:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1218:                LDFLAGS=\"$LDFLAGS\""
                   1219:        C_STANDARD=-std=gnu99
                   1220:        ELF=
                   1221:    break ;;
                   1222: 
                   1223:    Interix)
                   1224:        EXPORT_DYNAMIC=-Wl,--export-all-symbols
                   1225:        NESTED_FUNCTIONS=
                   1226:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1227:                --disable-shared --enable-static --enable-threads \
                   1228:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1229:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1230:                LDFLAGS=\"$LDFLAGS\""
                   1231:        C_STANDARD=-std=gnu99
                   1232:        ELF=
                   1233:    break;;
                   1234: 
                   1235:     AIX)
                   1236:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1237:        NESTED_FUNCTIONS=
                   1238:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1239:                --disable-shared --enable-static --enable-threads \
                   1240:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1241:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1242:                LDFLAGS=\"$LDFLAGS\""
                   1243:        C_STANDARD=-std=gnu99
                   1244:        ELF=
                   1245:    break ;;
                   1246: 
                   1247:     OS/2)
                   1248:        if test $FORCED_FINAL_ENCODING -eq 0; then \
                   1249:            FINAL_ENCODING=CP850; \
1.47      bertrand 1250:            FORCED_FINAL_ENCODING=1;\
1.1       bertrand 1251:        fi;
                   1252:        OS=OS2
                   1253:        NESTED_FUNCTIONS=
                   1254:        EXPORT_DYNAMIC=-Zmap
                   1255:        ac_configure_args="$ac_configure_args --without-readline \
                   1256:                --without-cairo --disable-shared --enable-static \
                   1257:                --enable-threads \
                   1258:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1259:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1260:                LDFLAGS=\"$LDFLAGS\""
                   1261:        C_STANDARD=
                   1262:        ELF=
                   1263:    break;;
                   1264: 
                   1265:    OpenBSD)
                   1266:        if test $FORCED_FINAL_ENCODING -eq 0; then \
                   1267:            FINAL_ENCODING=UTF-8; \
1.47      bertrand 1268:            FORCED_FINAL_ENCODING=1;\
1.1       bertrand 1269:        fi;
                   1270:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1271:        NESTED_FUNCTIONS=
                   1272:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1273:                --disable-shared --enable-static --enable-threads \
                   1274:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1275:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1276:                LDFLAGS=\"$LDFLAGS\""
                   1277:        C_STANDARD=-std=gnu99
                   1278:        ELF=
                   1279:    break;;
                   1280: 
                   1281:     SunOS)
                   1282:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1283:        NESTED_FUNCTIONS=
                   1284: 
                   1285:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1286:                --disable-shared --enable-static --enable-threads \
                   1287:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1288:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1289:                LDFLAGS=\"$LDFLAGS\""
                   1290:        C_STANDARD=-std=gnu99
                   1291:        MALLOC=-lumem
                   1292:        ELF=
                   1293:    break ;;
                   1294: 
                   1295:     NetBSD)
                   1296:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1297:        NESTED_FUNCTIONS=
                   1298: 
                   1299:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1300:                --disable-shared --enable-static --enable-threads \
                   1301:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1302:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1303:                LDFLAGS=\"$LDFLAGS\""
                   1304:        C_STANDARD=-std=gnu99
                   1305:        GCCBIN=`which gcc`
                   1306:        GCCLIB=`dirname $GCCBIN`/../lib
                   1307:        ELF="-Wl,-R/usr/pkg/lib -Wl,-R$GCCLIB"
                   1308:    break ;;
                   1309: 
                   1310:     *)
                   1311:        EXPORT_DYNAMIC=-Wl,--export-dynamic
                   1312:        NESTED_FUNCTIONS=
                   1313: 
                   1314:        ac_configure_args="$ac_configure_args --with-readline=builtin \
                   1315:                --disable-shared --enable-static --enable-threads \
                   1316:                CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" \
                   1317:                FFLAGS=\"$FFLAGS\" FCFLAGS=\"$FCFLAGS\" \
                   1318:                LDFLAGS=\"$LDFLAGS\""
                   1319:        C_STANDARD=-std=gnu99
                   1320:        ELF=
                   1321:    break ;;
1.5       bertrand 1322: esac
                   1323: 
1.109     bertrand 1324: dnl Correction d'un problème de compilation pour GNUplot 5.0.0
                   1325: ac_configure_args="$ac_configure_args --disable-wxwidgets"
1.130     bertrand 1326: dnl Correction d'un problème d'ABI avec readline
                   1327: ac_configure_args="$ac_configure_args \
                   1328:        --with-abi-version=5.9 --with-rel-version=5.9"
1.109     bertrand 1329: 
1.5       bertrand 1330: case $OS in
                   1331:     OS2)
                   1332:        WHOLE_LIB1=""
                   1333:        WHOLE_LIB2=""
1.6       bertrand 1334:        LIB_PREFIX=""
1.5       bertrand 1335:    break ;;
1.1       bertrand 1336: 
1.5       bertrand 1337:    *)
                   1338:        WHOLE_LIB1="-Wl,-whole-archive"
                   1339:        WHOLE_LIB2="-Wl,-no-whole-archive"
1.6       bertrand 1340:        LIB_PREFIX="lib"
1.5       bertrand 1341:    break ;;
1.1       bertrand 1342: esac
                   1343: 
1.173     bertrand 1344: BROKEN_SIGSEGV=-UBROKEN_SIGSEGV
                   1345: BUILD_SIGSEGV=$SIGSEGV
1.178     bertrand 1346: if test x"$LIB_PREFIX" = x"lib"; then
                   1347:    LIBSIGSEGV=\$\(top_builddir\)/tools/$SIGSEGV/src/.libs/libsigsegv.a
                   1348: else
                   1349:    LIBSIGSEGV=\$\(top_builddir\)/tools/$SIGSEGV/src/.libs/sigsegv.a
                   1350: fi
1.175     bertrand 1351: INCSIGSEGV="-I\$(top_builddir)/tools/$SIGSEGV/src"
1.176     bertrand 1352: CYGWIN_LDFLAGS=
1.173     bertrand 1353: 
1.12      bertrand 1354: case $HOST in
1.33      bertrand 1355:    x86_64-*-linux-gnu)
1.12      bertrand 1356:        ARCH=amd64
                   1357:    break ;;
                   1358: 
1.33      bertrand 1359:    i?86-*-linux-gnu)
1.12      bertrand 1360:        ARCH=i386
                   1361:    break ;;
                   1362: 
1.24      bertrand 1363:    arm-unknown-linux-gnueabi)
                   1364:        ARCH=armel
                   1365:    break;;
                   1366: 
1.58      bertrand 1367:    mips*el-unknown-linux-gnu)
1.53      bertrand 1368:        ARCH=mipsel
                   1369:    break;;
                   1370: 
1.176     bertrand 1371:    x86_64-*-cygwin)
1.173     bertrand 1372:        BROKEN_SIGSEGV=-DBROKEN_SIGSEGV
1.174     bertrand 1373:        BUILD_SIGSEGV=
1.173     bertrand 1374:        INCSIGSEGV=
                   1375:        LIBSIGSEGV=
                   1376:        ARCH=$(echo $HOST | cut -f1 -d-)
1.177     bertrand 1377:        CYGWIN_LDFLAGS=-Wl,--allow-multiple-definition \
                   1378:                -Wl,--out-implib,rpl.exe.a
1.173     bertrand 1379:    break;;
                   1380: 
1.12      bertrand 1381:    *)
1.72      bertrand 1382:        ARCH=$(echo $HOST | cut -f1 -d-)
1.12      bertrand 1383:    break ;;
                   1384: esac
                   1385: 
1.173     bertrand 1386: AC_SUBST(INCSIGSEGV)
                   1387: AC_SUBST(LIBSIGSEGV)
1.5       bertrand 1388: AC_SUBST(WHOLE_LIB1)
                   1389: AC_SUBST(WHOLE_LIB2)
1.6       bertrand 1390: AC_SUBST(LIB_PREFIX)
1.176     bertrand 1391: AC_SUBST(CYGWIN_LDFLAGS)
1.5       bertrand 1392: 
1.1       bertrand 1393: AC_SUBST(C_STANDARD)
                   1394: AC_SUBST(EXPORT_DYNAMIC)
1.170     bertrand 1395: AC_SUBST(NO_EXPORT_DYNAMIC)
1.1       bertrand 1396: AC_SUBST(NESTED_FUNCTIONS)
                   1397: AC_SUBST(SEMAPHORES_NOMMES)
                   1398: AC_SUBST(IPCS_SYSV)
                   1399: AC_SUBST(SEMUN)
                   1400: AC_SUBST(IPV6)
                   1401: AC_SUBST(BSH_PATH)
                   1402: AC_SUBST(ELF)
1.12      bertrand 1403: AC_SUBST(ARCH)
1.1       bertrand 1404: 
                   1405: AC_SUBST(NCURSES)
                   1406: AC_SUBST(READLINE)
                   1407: AC_SUBST(UNITS)
                   1408: AC_SUBST(GSL)
                   1409: AC_SUBST(GPP)
                   1410: AC_SUBST(GNUPLOT)
                   1411: AC_SUBST(FILE)
                   1412: AC_SUBST(ICONV)
                   1413: AC_SUBST(SQLITE)
                   1414: AC_SUBST(OPENSSL)
                   1415: AC_SUBST(LIBXPM)
                   1416: AC_SUBST(OPENMOTIF)
                   1417: AC_SUBST(BUILD_OPENMOTIF)
                   1418: AC_SUBST(SIGSEGV)
                   1419: AC_SUBST(FINAL_ENCODING)
1.47      bertrand 1420: AC_SUBST(FORCED_FINAL_ENCODING)
1.1       bertrand 1421: AC_SUBST(DATE)
                   1422: AC_SUBST(EXT_SQL)
                   1423: AC_SUBST(MALLOC)
                   1424: AC_SUBST(GMP)
                   1425: AC_SUBST(MPFR)
1.137     bertrand 1426: AC_SUBST(MPFI)
1.1       bertrand 1427: AC_SUBST(NTL)
                   1428: AC_SUBST(COCOA)
                   1429: AC_SUBST(PARI)
                   1430: AC_SUBST(GIAC)
                   1431: AC_SUBST(INCMOTIF)
                   1432: AC_SUBST(LIBMOTIF)
1.197     bertrand 1433: AC_SUBST(MODULE_MOTIF)
1.62      bertrand 1434: AC_SUBST(ZLIB)
1.173     bertrand 1435: AC_SUBST(BUILD_SIGSEGV)
                   1436: AC_SUBST(BROKEN_SIGSEGV)
1.1       bertrand 1437: 
                   1438: AC_SUBST(CFLAGS)
                   1439: AC_SUBST(CXXFLAGS)
                   1440: AC_SUBST(FFLAGS)
                   1441: AC_SUBST(FCFLAGS)
                   1442: AC_SUBST(LDFLAGS)
1.23      bertrand 1443: AC_SUBST(SYSROOT)
1.25      bertrand 1444: AC_SUBST(SYSROOT2)
1.1       bertrand 1445: 
1.16      bertrand 1446: AC_SUBST(DEBPQ)
                   1447: AC_SUBST(DEBMYSQL)
                   1448: AC_SUBST(DEBVIM)
                   1449: 
1.6       bertrand 1450: if test $RECURSIVE = yes; then
                   1451:    AC_CONFIG_SUBDIRS(tools/$NCURSES)
                   1452:    AC_CONFIG_SUBDIRS(tools/$READLINE)
                   1453:    AC_CONFIG_SUBDIRS(tools/$GSL)
                   1454:    AC_CONFIG_SUBDIRS(tools/$GPP)
                   1455:    AC_CONFIG_SUBDIRS(tools/$FILE)
                   1456:    AC_CONFIG_SUBDIRS(tools/$ICONV)
                   1457:    AC_CONFIG_SUBDIRS(tools/$SQLITE)
                   1458:    AC_CONFIG_SUBDIRS(tools/$UNITS)
1.174     bertrand 1459:    if test x$BUILD_SIGSEGV = x$SIGSEGV; then
                   1460:        AC_CONFIG_SUBDIRS(tools/$SIGSEGV)
                   1461:    fi
1.6       bertrand 1462: fi
1.1       bertrand 1463: 
                   1464: AC_CONFIG_FILES(Makefile)
1.59      bertrand 1465: AC_CONFIG_FILES(HEADER)
1.1       bertrand 1466: AC_CONFIG_FILES(tools/Makefile)
                   1467: AC_CONFIG_FILES(src/Makefile)
                   1468: AC_CONFIG_FILES(man/Makefile)
                   1469: AC_CONFIG_FILES(man/fr_FR/Makefile)
                   1470: AC_CONFIG_FILES(doc/Makefile)
                   1471: AC_CONFIG_FILES(scripts/Makefile)
                   1472: AC_CONFIG_FILES(scripts/mkrplso)
                   1473: AC_CONFIG_FILES(scripts/rplcc)
                   1474: AC_CONFIG_FILES(scripts/rpllink)
                   1475: AC_CONFIG_FILES(rpltags/Makefile)
                   1476: AC_CONFIG_FILES(rpliconv/Makefile)
                   1477: AC_CONFIG_FILES(rplsums/Makefile)
                   1478: AC_CONFIG_FILES(rplcas/Makefile)
                   1479: AC_CONFIG_FILES(rplawk/Makefile)
                   1480: AC_CONFIG_FILES(lapack/lapack/Makefile)
                   1481: AC_CONFIG_FILES(lapack/blas/Makefile)
1.196     bertrand 1482: AC_CONFIG_FILES(modules/motif/Makefile)
1.195     bertrand 1483: AC_CONFIG_FILES(modules/sets/Makefile)
1.1       bertrand 1484: 
                   1485: AC_CONFIG_FILES(man/rpl.1)
                   1486: AC_CONFIG_FILES(man/rplcc.1)
                   1487: AC_CONFIG_FILES(man/rpllink.1)
                   1488: AC_CONFIG_FILES(man/rpltags.1)
                   1489: AC_CONFIG_FILES(man/mkrplso.1)
                   1490: AC_CONFIG_FILES(man/fr_FR/rpl.1)
                   1491: AC_CONFIG_FILES(man/fr_FR/rplcc.1)
                   1492: AC_CONFIG_FILES(man/fr_FR/rpllink.1)
                   1493: AC_CONFIG_FILES(man/fr_FR/rpltags.1)
                   1494: AC_CONFIG_FILES(man/fr_FR/mkrplso.1)
                   1495: 
1.12      bertrand 1496: AC_CONFIG_FILES(DEBIAN/control)
                   1497: 
1.1       bertrand 1498: AC_OUTPUT

CVSweb interface <joel.bertrand@systella.fr>