From: Amos Jeffries Date: Thu, 24 Sep 2009 13:41:25 +0000 (+1200) Subject: Bug 2777: Don't know how to make target `-lrt' on OpenSolaris X-Git-Tag: SQUID_3_2_0_1~696 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46577dd1ca9b63684bb792987db0251900e74367;p=thirdparty%2Fsquid.git Bug 2777: Don't know how to make target `-lrt' on OpenSolaris --- diff --git a/configure.in b/configure.in index deed47f129..b111b425d9 100644 --- a/configure.in +++ b/configure.in @@ -463,6 +463,7 @@ AC_DEFINE(USE_DISKIO_DISKTHREADS, 0, [Whether pthreads support is needed. Automa USE_AIOPS_WIN32=0 use_aio= use_diskthreads= +AIOLIB= dnl Setup the module paths etc. FOUND_DISKIO_AIO= @@ -575,16 +576,16 @@ for module in $MAYBE_DISK_MODULES none; do FOUND_DISKIO_AIO="yes" dnl Check for POSIX AIO availability use_aio="yes" - LIBAIO= + AIOLIB= AC_ARG_WITH(aio, AS_HELP_STRING([--without-aio],[Do not use POSIX AIO. Default: auto-detect])) if test "$with_aio" != "no"; then have_aio_header=no AC_CHECK_HEADERS(aio.h,[have_aio_header=yes]) dnl On some systems POSIX AIO functions are in librt dnl On some systems POSIX AIO functions are in libaio - AC_CHECK_LIB(rt,aio_read,[LIBAIO="-lrt"],AC_CHECK_LIB(aio,aio_read,[LIBAIO="-laio"],[])) + AC_CHECK_LIB(rt,aio_read,[AIOLIB="-lrt"],AC_CHECK_LIB(aio,aio_read,[AIOLIB="-laio"],[])) dnl Enable AIO if the library and headers are found - if test "$LIBAIO" != "" && test "$have_aio_header" = "yes"; then + if test "$AIOLIB" != "" && test "$have_aio_header" = "yes"; then AC_MSG_NOTICE([Native POSIX AIO support detected.]) use_aio="yes" else @@ -609,7 +610,7 @@ for module in $MAYBE_DISK_MODULES none; do if test "$use_aio" = "yes" ; then AC_DEFINE(USE_DISKIO_AIO, 1, [Whether POSIX AIO support is needed. Automatic]) DISK_MODULES="$DISK_MODULES AIO" - DISK_LIBS="$DISK_LIBS $LIBAIO libAIO.a" + DISK_LIBS="$DISK_LIBS libAIO.a" DISK_LINKOBJS="$DISK_LINKOBJS DiskIO/AIO/AIODiskIOModule.o" case "$host_os" in mingw|mingw32) @@ -649,6 +650,7 @@ AC_SUBST(DISK_MODULES) AC_SUBST(DISK_LIBS) AC_SUBST(DISK_PROGRAMS) AC_SUBST(DISK_LINKOBJS) +AC_SUBST(AIOLIB) AM_CONDITIONAL([USE_AIOPS_WIN32], [test "$USE_AIOPS_WIN32" = 1]) AM_CONDITIONAL([USE_AIO_WIN32], [test "$USE_AIO_WIN32" = 1]) diff --git a/src/Makefile.am b/src/Makefile.am index 5abafe783f..698c1fa70b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -535,6 +535,7 @@ squid_LDADD = \ @DISK_LINKOBJS@ \ @REPL_OBJS@ \ @DISK_LIBS@ \ + @AIOLIB@ \ @CRYPTLIB@ \ @REGEXLIB@ \ @SNMPLIB@ \ @@ -1228,12 +1229,14 @@ nodist_tests_testDiskIO_SOURCES= \ tests_testDiskIO_LDADD = \ $(SWAP_TEST_LDADD) \ @DISK_LIBS@ \ + @AIOLIB@ \ $(COMMON_LIBS) \ SquidConfig.o tests_testDiskIO_LDFLAGS = $(LIBADD_DL) tests_testDiskIO_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \ @DISK_LIBS@ \ + @AIOLIB@ \ $(SWAP_TEST_DS) \ @SQUID_CPPUNIT_LA@ @@ -1969,6 +1972,7 @@ SWAP_TEST_LDADD = \ $(COMMON_LIBS) \ @REPL_OBJS@ \ @DISK_LIBS@ \ + @AIOLIB@ \ -L../lib -lmiscutil \ acl/libapi.la \ @SQUID_CPPUNIT_LIBS@ @@ -1976,6 +1980,7 @@ SWAP_TEST_DS =\ $(top_builddir)/lib/libmiscutil.a \ repl_modules.o \ @DISK_LIBS@ \ + @AIOLIB@ \ $(COMMON_LIBS) \ @REPL_OBJS@ \ @SQUID_CPPUNIT_LA@