Annotation of rpl/configure.ac, revision 1.181

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

CVSweb interface <joel.bertrand@systella.fr>