From 1a9a193b4bc4d681ec46ed1c76858bdce7a7ce32 Mon Sep 17 00:00:00 2001 From: Jason Kasper Date: Sun, 19 Jan 2003 19:49:20 +0000 Subject: [PATCH] now looking for lib and headers separately --- configure | 38 ++++++++++++++++++++++++++++++++++++-- configure.ac | 33 +++++++++++++++++++++++++++++---- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a557745..5724541 100755 --- a/configure +++ b/configure @@ -868,6 +868,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System --with-bt-includes blackbox library headers + --with-bt-lib blackbox library Some influential environment variables: CC C compiler command @@ -6038,9 +6039,42 @@ fi echo "$as_me:$LINENO: result: $blackbox_inc" >&5 echo "${ECHO_T}$blackbox_inc" >&6 - CXXFLAGS="$CXXFLAGS -I$blackbox_inc" -LIBS="$LIBS -L$blackbox_inc -lbt" + + +blackbox_lib="" +echo "$as_me:$LINENO: checking for blackbox lib" >&5 +echo $ECHO_N "checking for blackbox lib... $ECHO_C" >&6 + +# Check whether --with-bt-lib or --without-bt-lib was given. +if test "${with_bt_lib+set}" = set; then + withval="$with_bt_lib" + ac_blackbox_lib=$withval +else + ac_blackbox_lib="" +fi; + +# if the blackbox headers directory was specified, make sure we have it +for btdir in $ac_blackbox_lib /usr/local /usr/lib /usr; do + if test -f "$btdir/libbt.a"; then + blackbox_lib=$btdir + break + fi +done + +if test -z "$blackbox_lib"; then + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + echo + echo "Couldn't find your blackbox library." + echo "Use --with-bt-lib=dir option to fix this." + echo + exit 1 +fi + +echo "$as_me:$LINENO: result: $blackbox_lib" >&5 +echo "${ECHO_T}$blackbox_lib" >&6 +LIBS="$LIBS -L$blackbox_lib -lbt" ac_config_headers="$ac_config_headers config.h" diff --git a/configure.ac b/configure.ac index ecf56ce..e4afde9 100644 --- a/configure.ac +++ b/configure.ac @@ -131,7 +131,7 @@ dnl Checks for Xextension AC_CHECK_LIB(Xext, XMissingExtension, LIBS="$LIBS -lXext", AC_MSG_ERROR(XMissingExtension not found in -lXext)) -dnl check for blackbox library and headers +dnl check for blackbox headers blackbox_inc="" AC_MSG_CHECKING([for blackbox headers]) AC_ARG_WITH(bt-includes, @@ -156,10 +156,35 @@ if test -z "$blackbox_inc"; then fi AC_MSG_RESULT([$blackbox_inc]) - CXXFLAGS="$CXXFLAGS -I$blackbox_inc" -dnl for the time being, assume the lib is in the same spot as the headers -LIBS="$LIBS -L$blackbox_inc -lbt" + + +dnl now check for blackbox library +blackbox_lib="" +AC_MSG_CHECKING([for blackbox lib]) +AC_ARG_WITH(bt-lib, + AC_HELP_STRING([--with-bt-lib], [blackbox library]), + ac_blackbox_lib=$withval, ac_blackbox_lib="") + +# if the blackbox headers directory was specified, make sure we have it +for btdir in $ac_blackbox_lib /usr/local /usr/lib /usr; do + if test -f "$btdir/libbt.a"; then + blackbox_lib=$btdir + break + fi +done + +if test -z "$blackbox_lib"; then + AC_MSG_RESULT([Not found]) + echo + echo "Couldn't find your blackbox library." + echo "Use --with-bt-lib=dir option to fix this." + echo + exit 1 +fi + +AC_MSG_RESULT([$blackbox_lib]) +LIBS="$LIBS -L$blackbox_lib -lbt" dnl generate the config header AM_CONFIG_HEADER(config.h) -- 2.11.4.GIT