From 54a3209cf587917e864b94511a9fbb590109584b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 1 Dec 2014 23:14:28 +0900 Subject: [PATCH] configure.ac: Rename some variables so that they follow automake convention --- configure.ac | 18 +++++++++--------- src/Makefile.am | 4 ++-- tests/Makefile.am | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 266d4285..9b583944 100644 --- a/configure.ac +++ b/configure.ac @@ -202,41 +202,41 @@ AC_LANG_POP() # Checks for libraries. # Additional libraries required for tests. -TESTS_LIBS= +TESTLDFLAGS= # Additional libraries required for programs under src directory. -SRC_LIBS= +APPLDFLAGS= LIBS_OLD=$LIBS # Search for dlsym function, which is used in tests. Linux needs -ldl, # but netbsd does not need it. AC_SEARCH_LIBS([dlsym], [dl]) -TESTS_LIBS="$LIBS $TESTS_LIBS" +TESTLDFLAGS="$LIBS $TESTLDFLAGS" LIBS=$LIBS_OLD LIBS_OLD=$LIBS AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define to 1 if you have the `clock_gettime`.])]) -SRC_LIBS="$LIBS $SRC_LIBS" +APPLDFLAGS="$LIBS $APPLDFLAGS" LIBS=$LIBS_OLD case "$host" in *android*) android_build=yes # android does not need -pthread, but needs followng 2 libs for C++ - SRC_LIBS="$SRC_LIBS -lstdc++ -lsupc++" + APPLDFLAGS="$APPLDFLAGS -lstdc++ -lsupc++" ;; *) PTHREAD_LDFLAGS="-pthread" - SRC_LIBS="$SRC_LIBS $PTHREAD_LDFLAGS" + APPLDFLAGS="$APPLDFLAGS $PTHREAD_LDFLAGS" ;; esac # zlib if test "x$android_build" = "xyes"; then # Use zlib provided by NDK - SRC_LIBS="-lz $SRC_LIBS" + APPLDFLAGS="-lz $APPLDFLAGS" have_zlib=yes else PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3], [have_zlib=yes], [have_zlib=no]) @@ -576,8 +576,8 @@ if test "x$threads" != "xyes" || test "x$have_std_future" != "xyes"; then AC_DEFINE([NOTHREADS], [1], [Define to 1 if you want to disable threads.]) fi -AC_SUBST([TESTS_LIBS]) -AC_SUBST([SRC_LIBS]) +AC_SUBST([TESTLDFLAGS]) +AC_SUBST([APPLDFLAGS]) AC_CONFIG_FILES([ Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 8c6a1248..da478cf5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,7 +49,7 @@ AM_LDFLAGS = \ @OPENSSL_LIBS@ \ @JANSSON_LIBS@ \ @ZLIB_LIBS@ \ - @SRC_LIBS@ + @APPLDFLAGS@ LDADD = \ $(top_builddir)/lib/libnghttp2.la \ @@ -145,7 +145,7 @@ nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS}\ -DNGHTTP2_TESTS_DIR=\"$(top_srcdir)/tests\" nghttpx_unittest_LDFLAGS = -static nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} ${AM_LDFLAGS} \ - @CUNIT_LIBS@ @TESTS_LIBS@ + @CUNIT_LIBS@ @TESTLDFLAGS@ TESTS += nghttpx-unittest endif # HAVE_CUNIT diff --git a/tests/Makefile.am b/tests/Makefile.am index 34fff1a3..424ca996 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -50,7 +50,7 @@ HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \ main_SOURCES = $(HFILES) $(OBJECTS) main_LDADD = ${top_builddir}/lib/libnghttp2.la -main_LDFLAGS = -static @CUNIT_LIBS@ @TESTS_LIBS@ +main_LDFLAGS = -static @CUNIT_LIBS@ @TESTLDFLAGS@ if ENABLE_FAILMALLOC failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \