Annotation of rpl/configure.ac, revision 1.143

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

CVSweb interface <joel.bertrand@systella.fr>