]> Pileus Git - ~andy/rsl/commitdiff
Use AC_SEARCH_LIBS
authorAndy Spencer <andy753421@gmail.com>
Sun, 1 Jan 2012 02:11:24 +0000 (18:11 -0800)
committerAndy Spencer <andy753421@gmail.com>
Sun, 1 Jan 2012 02:11:24 +0000 (18:11 -0800)
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.

configure.ac

index eda0acec917e37f507fd422c146c1539da97c0c2..78431d3e1ed914b2bcd96586b612ac6f99dc37a0 100644 (file)
@@ -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