Commit 54a3209c authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

configure.ac: Rename some variables so that they follow automake convention

parent 9eb554a8
...@@ -202,41 +202,41 @@ AC_LANG_POP() ...@@ -202,41 +202,41 @@ AC_LANG_POP()
# Checks for libraries. # Checks for libraries.
# Additional libraries required for tests. # Additional libraries required for tests.
TESTS_LIBS= TESTLDFLAGS=
# Additional libraries required for programs under src directory. # Additional libraries required for programs under src directory.
SRC_LIBS= APPLDFLAGS=
LIBS_OLD=$LIBS LIBS_OLD=$LIBS
# Search for dlsym function, which is used in tests. Linux needs -ldl, # Search for dlsym function, which is used in tests. Linux needs -ldl,
# but netbsd does not need it. # but netbsd does not need it.
AC_SEARCH_LIBS([dlsym], [dl]) AC_SEARCH_LIBS([dlsym], [dl])
TESTS_LIBS="$LIBS $TESTS_LIBS" TESTLDFLAGS="$LIBS $TESTLDFLAGS"
LIBS=$LIBS_OLD LIBS=$LIBS_OLD
LIBS_OLD=$LIBS LIBS_OLD=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt], AC_SEARCH_LIBS([clock_gettime], [rt],
[AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
[Define to 1 if you have the `clock_gettime`.])]) [Define to 1 if you have the `clock_gettime`.])])
SRC_LIBS="$LIBS $SRC_LIBS" APPLDFLAGS="$LIBS $APPLDFLAGS"
LIBS=$LIBS_OLD LIBS=$LIBS_OLD
case "$host" in case "$host" in
*android*) *android*)
android_build=yes android_build=yes
# android does not need -pthread, but needs followng 2 libs for C++ # 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" PTHREAD_LDFLAGS="-pthread"
SRC_LIBS="$SRC_LIBS $PTHREAD_LDFLAGS" APPLDFLAGS="$APPLDFLAGS $PTHREAD_LDFLAGS"
;; ;;
esac esac
# zlib # zlib
if test "x$android_build" = "xyes"; then if test "x$android_build" = "xyes"; then
# Use zlib provided by NDK # Use zlib provided by NDK
SRC_LIBS="-lz $SRC_LIBS" APPLDFLAGS="-lz $APPLDFLAGS"
have_zlib=yes have_zlib=yes
else else
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3], [have_zlib=yes], [have_zlib=no]) 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 ...@@ -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.]) AC_DEFINE([NOTHREADS], [1], [Define to 1 if you want to disable threads.])
fi fi
AC_SUBST([TESTS_LIBS]) AC_SUBST([TESTLDFLAGS])
AC_SUBST([SRC_LIBS]) AC_SUBST([APPLDFLAGS])
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
......
...@@ -49,7 +49,7 @@ AM_LDFLAGS = \ ...@@ -49,7 +49,7 @@ AM_LDFLAGS = \
@OPENSSL_LIBS@ \ @OPENSSL_LIBS@ \
@JANSSON_LIBS@ \ @JANSSON_LIBS@ \
@ZLIB_LIBS@ \ @ZLIB_LIBS@ \
@SRC_LIBS@ @APPLDFLAGS@
LDADD = \ LDADD = \
$(top_builddir)/lib/libnghttp2.la \ $(top_builddir)/lib/libnghttp2.la \
...@@ -145,7 +145,7 @@ nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS}\ ...@@ -145,7 +145,7 @@ nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS}\
-DNGHTTP2_TESTS_DIR=\"$(top_srcdir)/tests\" -DNGHTTP2_TESTS_DIR=\"$(top_srcdir)/tests\"
nghttpx_unittest_LDFLAGS = -static nghttpx_unittest_LDFLAGS = -static
nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} ${AM_LDFLAGS} \ nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} ${AM_LDFLAGS} \
@CUNIT_LIBS@ @TESTS_LIBS@ @CUNIT_LIBS@ @TESTLDFLAGS@
TESTS += nghttpx-unittest TESTS += nghttpx-unittest
endif # HAVE_CUNIT endif # HAVE_CUNIT
......
...@@ -50,7 +50,7 @@ HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \ ...@@ -50,7 +50,7 @@ HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \
main_SOURCES = $(HFILES) $(OBJECTS) main_SOURCES = $(HFILES) $(OBJECTS)
main_LDADD = ${top_builddir}/lib/libnghttp2.la main_LDADD = ${top_builddir}/lib/libnghttp2.la
main_LDFLAGS = -static @CUNIT_LIBS@ @TESTS_LIBS@ main_LDFLAGS = -static @CUNIT_LIBS@ @TESTLDFLAGS@
if ENABLE_FAILMALLOC if ENABLE_FAILMALLOC
failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \ failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment