Annotation of rpl/configure.ac, revision 1.237

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

CVSweb interface <joel.bertrand@systella.fr>