--- rpl/Attic/configure.in 2010/03/09 10:18:41 1.11 +++ rpl/Attic/configure.in 2010/04/20 12:49:18 1.19 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rpl],[4.0.13]) +AC_INIT([rpl],[4.0.14]) AC_CANONICAL_TARGET AC_CANONICAL_TARGET AM_INIT_AUTOMAKE @@ -10,13 +10,13 @@ dnl Libraries NCURSES=ncurses-5.7-20100206 READLINE=readline-6.1 UNITS=units-1.87 -GSL=gsl-1.13 +GSL=gsl-1.14 GPP=gpp-2.24 -GNUPLOT=gnuplot-4.2.6 +GNUPLOT=gnuplot-4.4.0 FILE=file-5.03 ICONV=libiconv-1.13.1 -SQLITE=sqlite-3.6.22 -OPENSSL=openssl-0.9.8m +SQLITE=sqlite-3.6.23.1 +OPENSSL=openssl-1.0.0 dnl Checks for C compiler AC_PROG_CC(gcc-4.4 gcc) @@ -119,12 +119,12 @@ AC_ARG_ENABLE(final-encoding, [ --enable-final-encoding force final encoding [[default=guessed]]], [ if test "$enableval" = "no"; then FINAL_ENCODING="\$(shell locale charmap | \ - awk '/=/ { print \$\$3;} !/=/ { print \$\$1;}')" + \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')" else FINAL_ENCODING="$enable_final_encoding" fi], FINAL_ENCODING="\$(shell locale charmap | \ - awk '/=/ { print \$\$3;} !/=/ { print \$\$1;}')") + \$(AWK) '/\=/ { print \$\$3;} !/\=/ { print \$\$1;}')") AC_ARG_ENABLE(tex, [ --enable-tex provide the TeX support [[default=guessed]]], [ @@ -245,16 +245,7 @@ fi if test ! -d "$srcdir"/tools/$FILE; then gunzip -c "$srcdir"/tools/$FILE.tar.gz | \ (cd "$srcdir/tools" && tar -xf - ) - TMP=$(mktemp) (cd "$srcdir/tools"/$FILE && gunzip -c ../$FILE.diff.gz | patch -p1) - sed 's/libmagic/librplfile/g' "$srcdir"/tools/$FILE/src/Makefile.am > $TMP - sed 's/^bin_PROGRAMS = file/bin_PROGRAMS = rplfile/g' $TMP | \ - sed 's/^file_/rplfile_/g' > \ - "$srcdir"/tools/$FILE/src/Makefile.am - sed 's/file$/rplfile/g' "$srcdir"/tools/$FILE/magic/Makefile.am > $TMP - \mv -f $TMP "$srcdir"/tools/$FILE/magic/Makefile.am - (cd "$srcdir"/tools/$FILE && libtoolize --copy --force \ - && aclocal && automake -af && autoconf); fi if test ! -d "$srcdir"/tools/$ICONV; then gunzip -c "$srcdir"/tools/$ICONV.tar.gz | \ @@ -269,26 +260,6 @@ if test ! -d tools/$OPENSSL; then (cd tools && tar -xf -) fi -AC_CHECK_PROG(LIBTOOLIZE, libtoolize, yes, no) -if test "$LIBTOOLIZE" = "no"; then - AC_MSG_ERROR([Cannot find libtoolize! You have to install it.]) -fi - -AC_CHECK_PROG(ACLOCAL, aclocal, yes, no) -if test "$ACLOCAL" = "no"; then - AC_MSG_ERROR([Cannot find aclocal! You have to install it.]) -fi - -AC_CHECK_PROG(AUTOMAKE, automake, yes, no) -if test "$AUTOMAKE" = "no"; then - AC_MSG_ERROR([Cannot find automake! You have to install it.]) -fi - -AC_CHECK_PROG(AUTOCONF, autoconf, yes, no) -if test "$AUTOCONF" = "no"; then - AC_MSG_ERROR([Cannot find autoconf! You have to install it.]) -fi - dnl Default installation directory AC_PREFIX_DEFAULT(/usr/local) @@ -312,10 +283,10 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB -dnl Checks for awk -AC_CHECK_PROG(AWK, awk, yes, no) +dnl Checks for nawk +AC_CHECK_PROG(AWK, nawk, yes, no) if test "$AWK" = no; then - AC_MSG_ERROR([Can not find awk !]) + AC_MSG_ERROR([Can not find nawk !]) fi dnl Checks for sed @@ -762,15 +733,33 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(ftime getcwd putenv select strcspn strdup \ strerror strspn strstr strtod) +ac_configure_args="$ac_configure_args --with-readline=builtin --disable-shared --enable-static" + AC_CONFIG_SUBDIRS(tools/$NCURSES) AC_CONFIG_SUBDIRS(tools/$READLINE) -AC_CONFIG_SUBDIRS(tools/$UNITS) AC_CONFIG_SUBDIRS(tools/$GSL) AC_CONFIG_SUBDIRS(tools/$GPP) AC_CONFIG_SUBDIRS(tools/$FILE) AC_CONFIG_SUBDIRS(tools/$ICONV) AC_CONFIG_SUBDIRS(tools/$SQLITE) -tools/$OPENSSL/config +AC_CONFIG_SUBDIRS(tools/$UNITS) + +dnl Check for OpenSSL os/comp +AC_ARG_WITH(openssl_arch, +[ --with-openssl-arch=ARCH specify os and compiler for openssl (ARCH or list)], +[], [with_openssl_arch=none]) + +if test "x$with_openssl_arch" = xnone; then + (cd tools/$OPENSSL && ./config) +elif test "x$with_openssl_arch" = xyes -o "x$with_openssl_arch" = xno; then + (cd tools/$OPENSSL && ./Configure) + AC_MSG_ERROR([OS/COMP informations are required!]) +elif test "x$with_openssl_arch" = xlist; then + (cd tools/$OPENSSL && ./Configure) + AC_MSG_ERROR([Please specify OS and Architecture]) +else + (cd tools/$OPENSSL && ./Configure $with_openssl_arch) +fi if test "$MYGNUPLOT" = "yes"; then if test ! -d "$srcdir"/tools/$GNUPLOT; then @@ -844,7 +833,38 @@ else LIBMTMALLOC= fi +case $(OS) in + + Darwin) + EXPORT_DYNAMIC=-flat_namespace + NESTED_FUNCTIONS=-fnested-functions + SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES + break ;; + + Cygwin) + EXPORT_DYNAMIC=--export-all-symbols + NESTED_FUNCTIONS= + SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES + break ;; + + AIX) + EXPORT_DYNAMIC=--export-dynamic + NESTED_FUNCTIONS= + SEMAPHORES_NOMMES=-DSEMAPHORES_NOMMES + break ;; + + *) + EXPORT_DYNAMIC=--export-dynamic + NESTED_FUNCTIONS= + SEMAPHORES_NOMMES=-USEMAPHORES_NOMMES + break ;; + +esac + AC_SUBST(LIBMTMALLOC) +AC_SUBST(EXPORT_DYNAMIC) +AC_SUBST(NESTED_FUNCTIONS) +AC_SUBST(SEMAPHORES_NOMMES) AC_SUBST(NCURSES) AC_SUBST(READLINE)