From: Trond Norbye Date: Tue, 5 Aug 2008 10:00:42 +0000 (+0200) Subject: Detect the required libraries instead of hardcoding them in LDFLAGS X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=eefc6eb0fe117cd5161bf6e5918f53ff2bb7cab1;p=awesomized%2Flibmemcached Detect the required libraries instead of hardcoding them in LDFLAGS Use AC_SEARCH_LIBS to detect the required sockets libraries instead of hardcoding them in LDFLAGS for the Sun Studio compiler. --- diff --git a/configure.ac b/configure.ac index a99c994b..3376f450 100644 --- a/configure.ac +++ b/configure.ac @@ -66,7 +66,6 @@ then fi else CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ $CFLAGS" - LDFLAGS="-lsocket -lnsl $LDFLAGS" DTRACEFLAGS="$DTRACEFLAGS" fi @@ -74,4 +73,6 @@ AC_C_CONST AC_HEADER_TIME AC_TYPE_SIZE_T AC_SEARCH_LIBS(getopt_long, gnugetopt) +AC_SEARCH_LIBS(socket, socket) +AC_SEARCH_LIBS(gethostbyname, nsl) AC_OUTPUT(Makefile clients/Makefile tests/Makefile docs/Makefile libmemcached/Makefile support/Makefile support/libmemcached.pc support/libmemcached.spec) diff --git a/libmemcached/Makefile.am b/libmemcached/Makefile.am index b024d9f9..fbb7726a 100644 --- a/libmemcached/Makefile.am +++ b/libmemcached/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = libmemcached_probes.d memcached/README.txt INCLUDES = -I$(top_builddir) -LIBS = +LIBS = @LIBS@ DTRACE = @DTRACE@ DTRACEFLAGS = @DTRACEFLAGS@