Annotation of rpl/configure.ac, revision 1.220

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

CVSweb interface <joel.bertrand@systella.fr>