Annotation of rpl/configure.ac, revision 1.232

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

CVSweb interface <joel.bertrand@systella.fr>