Annotation of rpl/configure.ac, revision 1.140

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

CVSweb interface <joel.bertrand@systella.fr>