Annotation of rpl/configure.ac, revision 1.251

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

CVSweb interface <joel.bertrand@systella.fr>