From 3462959e6ab773dc56c5adddec27ab5591204fb9 Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 21 Jul 2008 16:49:03 +0000 Subject: [PATCH] Add settings for --with-site-includes=PATH and --with-site-libraries=PATH. --- configure.in | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 0355386..90f4cc2 100644 --- a/configure.in +++ b/configure.in @@ -14,16 +14,44 @@ AC_PROG_LIBTOOL # AC_CHECK_PROGS(LIBTOOL, glibtool libtool, libtool, \ # /usr/local/bin:/opt/bin:/sw/bin:/usr/bin:/bin) -# Checks for libraries. +# Settings for optional paths +AC_ARG_WITH(site_includes, + --with-site-includes=PATH List of directories to search first for header files +, +for dir in `echo "$with_site_includes"|sed 's/:/ /'` +do + SITE_INCLUDES_CFLAGS="$SITE_INCLUDES_CFLAGS -I$dir" +done +CFLAGS=`echo "$SITE_INCLUDES_CFLAGS $CFLAGS"|sed 's/^ *//'` +, if test -f /sw/include/db3/db.h; then CFLAGS="-I/sw/include/db3 $CFLAGS" - LIBS="-L/sw/lib -ldb-3 $LIBS" elif test -f /sw/include/db4/db.h; then CFLAGS="-I/sw/include/db4 $CFLAGS" + LIBS="-ldb $LIBS" +fi +) + +AC_ARG_WITH(site_libraries, + --with-site-libraries=PATH List of directories to search first for libraries +, +for dir in `echo "$with_site_libraries"|sed 's/:/ /'` +do + SITE_LIBS="$SITE_LIBS -L$dir" +done +LIBS=`echo "$SITE_LIBS $LIBS"|sed 's/^ *//'` +, +if test -f /sw/include/db3/db.h; then + LIBS="-L/sw/lib -ldb-3 $LIBS" +elif test -f /sw/include/db4/db.h; then LIBS="-L/sw/lib -ldb-4 $LIBS" else LIBS="-ldb $LIBS" fi +) + +# Checks for libraries. +LIBS="-ldb $LIBS" # Checks for header files. -- 1.7.10.4