From: Andy Spencer Date: Sun, 1 Jan 2012 02:11:24 +0000 (-0800) Subject: Use AC_SEARCH_LIBS X-Git-Url: http://pileus.org/git/?p=~andy%2Frsl;a=commitdiff_plain;h=df55c82952fac1dd083061e1d62feeb6178db919 Use AC_SEARCH_LIBS Also let autoconf set the default path, this might break things if there are libraries that are in funny places and need to be searched. --- diff --git a/configure.ac b/configure.ac index eda0ace..78431d3 100644 --- a/configure.ac +++ b/configure.ac @@ -32,11 +32,7 @@ AC_DEFINE(HAVE_LASSEN, 1, [For LASSEN capability. Change this to '#undef HAVE_LASSEN', if you dont want LASSEN.]) -# Checks for libraries. -if test $prefix = NONE; then - prefix=$ac_default_prefix -fi -LIBDIR="-L$prefix/lib" +# Standard libraries LIBS="-lz -lm" # The order of the libraries is important. @@ -45,16 +41,15 @@ LIBS="-lz -lm" # # If mounting with shared libraries we may have to specify all possible libraries. # First check with simple LIBS list, if it fails, then expand the list. - -AC_CHECK_LIB(implode, _implode, ,,$LIBDIR) -AC_CHECK_LIB(jpeg, jpeg_CreateCompress,,,$LIBDIR) -AC_CHECK_LIB(df, DFopen, ,,$LIBDIR) -AC_CHECK_LIB(mfhdf, SDstart, ,,$LIBDIR) -AC_CHECK_LIB(tsdistk, TKopen, ,,$LIBDIR) +AC_SEARCH_LIBS(_implode, implode) +AC_SEARCH_LIBS(jpeg_CreateCompress, jpeg ) +AC_SEARCH_LIBS(DFopen, df ) +AC_SEARCH_LIBS(SDstart, mfhdf ) +AC_SEARCH_LIBS(TKopen, tsdistk) # Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not. YYWRAP="" -AC_CHECK_LIB(tsdistk, yywrap, YYWRAP="yes",,$LIBDIR) +AC_SEARCH_LIBS(yywrap, tsdistk, YYWRAP="yes") if test "$YYWRAP" = ""; then LIBS="$LIBS $LEXLIB" fi