Annotation of rpl/configure.ac, revision 1.202

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

CVSweb interface <joel.bertrand@systella.fr>