mirror of https://github.com/aria2/aria2
				
				
				
			Use LIBS and CPPFLAGS instead of substituting them individually per
library.pull/1/head
							parent
							
								
									d3d1293974
								
							
						
					
					
						commit
						3f125dce21
					
				
							
								
								
									
										40
									
								
								configure.ac
								
								
								
								
							
							
						
						
									
										40
									
								
								configure.ac
								
								
								
								
							| 
						 | 
					@ -12,8 +12,6 @@ AC_CONFIG_HEADERS([config.h])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$target" in
 | 
					case "$target" in
 | 
				
			||||||
  *mingw*|*cygwin*)
 | 
					  *mingw*|*cygwin*)
 | 
				
			||||||
    WINSOCK_LIBS="-lws2_32"
 | 
					 | 
				
			||||||
    AC_SUBST(WINSOCK_LIBS)
 | 
					 | 
				
			||||||
    LIBS="-lws2_32 -lcrypto -lwsock32 -lgdi32 -lwinmm $LIBS"
 | 
					    LIBS="-lws2_32 -lcrypto -lwsock32 -lgdi32 -lwinmm $LIBS"
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
| 
						 | 
					@ -73,6 +71,8 @@ if test "x$with_libxml2" = "xyes"; then
 | 
				
			||||||
  AM_PATH_XML2([2.6.24], [have_libxml2=yes])
 | 
					  AM_PATH_XML2([2.6.24], [have_libxml2=yes])
 | 
				
			||||||
  if test "x$have_libxml2" = "xyes"; then
 | 
					  if test "x$have_libxml2" = "xyes"; then
 | 
				
			||||||
    AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have libxml2.])
 | 
					    AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have libxml2.])
 | 
				
			||||||
 | 
					    LIBS="$XML_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$XML_CPPFLAGS $CPPFLAGS"
 | 
				
			||||||
  elif test "x$with_libxml2_requested" = "xyes"; then
 | 
					  elif test "x$with_libxml2_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([libxml2])
 | 
					    ARIA2_DEP_NOT_MET([libxml2])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
| 
						 | 
					@ -80,16 +80,20 @@ fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$with_libexpat" = "xyes" && test "x$have_libxml2" != "xyes"; then
 | 
					if test "x$with_libexpat" = "xyes" && test "x$have_libxml2" != "xyes"; then
 | 
				
			||||||
  AM_PATH_LIBEXPAT
 | 
					  AM_PATH_LIBEXPAT
 | 
				
			||||||
  if test "x$have_libexpat" != "xyes" &&
 | 
					  if test "x$have_libexpat" = "xyes"; then
 | 
				
			||||||
     test "x$with_libexpat_requested" = "xyes"; then
 | 
					    LIBS="$LIBEXPAT_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$LIBEXPAT_CPPFLAGS $CPPFLAGS"
 | 
				
			||||||
 | 
					  elif test "x$with_libexpat_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([libexpat])
 | 
					    ARIA2_DEP_NOT_MET([libexpat])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$with_sqlite3" = "xyes"; then
 | 
					if test "x$with_sqlite3" = "xyes"; then
 | 
				
			||||||
  AM_PATH_SQLITE3
 | 
					  AM_PATH_SQLITE3
 | 
				
			||||||
  if test "x$have_sqlite3" != "xyes" &&
 | 
					  if test "x$have_sqlite3" = "xyes"; then
 | 
				
			||||||
     test "x$with_sqlite3_requested" = "xyes"; then
 | 
					    LIBS="$SQLITE3_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$SQLITE3_CFLAGS $CPPFLAGS"
 | 
				
			||||||
 | 
					  elif test "x$with_sqlite3_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([sqlite3])
 | 
					    ARIA2_DEP_NOT_MET([sqlite3])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -100,32 +104,38 @@ if test "x$with_gnutls" = "xyes"; then
 | 
				
			||||||
                    [have_libgnutls=yes], [have_libgnutls=no])
 | 
					                    [have_libgnutls=yes], [have_libgnutls=no])
 | 
				
			||||||
  if test "x$have_libgnutls" = "xyes"; then
 | 
					  if test "x$have_libgnutls" = "xyes"; then
 | 
				
			||||||
    AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.])
 | 
					    AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define to 1 if you have libgnutls.])
 | 
				
			||||||
 | 
					    LIBS="$LIBGNUTLS_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$LIBGNUTLS_CFLAGS $CPPFLAGS"
 | 
				
			||||||
  elif test "x$with_gnutls_requested" = "xyes"; then
 | 
					  elif test "x$with_gnutls_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([gnutls])
 | 
					    ARIA2_DEP_NOT_MET([gnutls])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  AC_SUBST(LIBGNUTLS_LIBS)
 | 
					 | 
				
			||||||
  AC_SUBST(LIBGNUTLS_CFLAGS)
 | 
					 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$have_libgnutls" = "xyes"; then
 | 
					if test "x$have_libgnutls" = "xyes"; then
 | 
				
			||||||
  AM_PATH_LIBGCRYPT([1.2.2], [have_libgcrypt=yes])
 | 
					  AM_PATH_LIBGCRYPT([1.2.2], [have_libgcrypt=yes])
 | 
				
			||||||
  if test "x$have_libgcrypt" = "xyes"; then
 | 
					  if test "x$have_libgcrypt" = "xyes"; then
 | 
				
			||||||
    AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
 | 
					    AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
 | 
				
			||||||
 | 
					    LIBS="$LIBGCRYPT_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$LIBGCRYPT_CFLAGS $CPPFLAGS"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
 | 
					if test "x$with_openssl" = "xyes" && test "x$have_libgnutls" != "xyes"; then
 | 
				
			||||||
  AM_PATH_OPENSSL
 | 
					  AM_PATH_OPENSSL
 | 
				
			||||||
  if test "x$have_openssl" != "xyes" &&
 | 
					  if test "x$have_openssl" = "xyes"; then
 | 
				
			||||||
     test "x$with_openssl_requested" = "xyes"; then
 | 
					    LIBS="$OPENSSL_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS"
 | 
				
			||||||
 | 
					  elif test "x$with_openssl_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([openssl])
 | 
					    ARIA2_DEP_NOT_MET([openssl])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$with_libcares" = "xyes"; then
 | 
					if test "x$with_libcares" = "xyes"; then
 | 
				
			||||||
  AM_PATH_LIBCARES
 | 
					  AM_PATH_LIBCARES
 | 
				
			||||||
  if test "x$have_libcares" != "xyes" &&
 | 
					  if test "x$have_libcares" = "xyes"; then
 | 
				
			||||||
     test "x$with_libcares_requested" = "xyes"; then
 | 
					    LIBS="$LIBCARES_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$LIBCARES_CPPFLAGS $CPPFLAGS"
 | 
				
			||||||
 | 
					  elif test "x$with_libcares_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([libcares])
 | 
					    ARIA2_DEP_NOT_MET([libcares])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -133,7 +143,10 @@ fi
 | 
				
			||||||
# Check availability of libz
 | 
					# Check availability of libz
 | 
				
			||||||
if test "x$with_libz" = "xyes"; then
 | 
					if test "x$with_libz" = "xyes"; then
 | 
				
			||||||
  AM_PATH_LIBZ
 | 
					  AM_PATH_LIBZ
 | 
				
			||||||
  if test "x$have_libz" != "xyes" && test "x$with_libz_requested" = "xyes"; then
 | 
					  if test "x$have_libz" = "xyes"; then
 | 
				
			||||||
 | 
					    LIBS="$LIBZ_LIBS $LIBS"
 | 
				
			||||||
 | 
					    CPPFLAGS="$LIBZ_CPPFLAGS $CPPFLAGS"
 | 
				
			||||||
 | 
					  elif test "x$with_libz_requested" = "xyes"; then
 | 
				
			||||||
    ARIA2_DEP_NOT_MET([libz])
 | 
					    ARIA2_DEP_NOT_MET([libz])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -497,6 +510,7 @@ echo "CFLAGS:         $CFLAGS"
 | 
				
			||||||
echo "CPPFLAGS:       $CPPFLAGS"
 | 
					echo "CPPFLAGS:       $CPPFLAGS"
 | 
				
			||||||
echo "LDFLAGS:        $LDFLAGS"
 | 
					echo "LDFLAGS:        $LDFLAGS"
 | 
				
			||||||
echo "LIBS:           $LIBS"
 | 
					echo "LIBS:           $LIBS"
 | 
				
			||||||
 | 
					echo "DEFS:           $DEFS"
 | 
				
			||||||
echo "SQLite3:        $have_sqlite3"
 | 
					echo "SQLite3:        $have_sqlite3"
 | 
				
			||||||
echo "GnuTLS:         $have_libgnutls"
 | 
					echo "GnuTLS:         $have_libgnutls"
 | 
				
			||||||
echo "OpenSSL:        $have_openssl"
 | 
					echo "OpenSSL:        $have_openssl"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@ AC_ARG_WITH([openssl-prefix],
 | 
				
			||||||
            [openssl_prefix=""])
 | 
					            [openssl_prefix=""])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$openssl_prefix" = "x"; then
 | 
					if test "x$openssl_prefix" = "x"; then
 | 
				
			||||||
  openssl_prefix="/usr/local"
 | 
					  openssl_prefix="/usr"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LIBS_save=$LIBS
 | 
					LIBS_save=$LIBS
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -556,14 +556,8 @@ endif # HAVE_KQUEUE
 | 
				
			||||||
AR = @AR@
 | 
					AR = @AR@
 | 
				
			||||||
noinst_LIBRARIES = libaria2c.a
 | 
					noinst_LIBRARIES = libaria2c.a
 | 
				
			||||||
libaria2c_a_SOURCES = $(SRCS)
 | 
					libaria2c_a_SOURCES = $(SRCS)
 | 
				
			||||||
aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\
 | 
					aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ #-lprofiler
 | 
				
			||||||
	@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@\
 | 
					 | 
				
			||||||
	@LIBCARES_LIBS@ @LIBEXPAT_LIBS@ @LIBZ_LIBS@\
 | 
					 | 
				
			||||||
	@SQLITE3_LIBS@ #-lprofiler
 | 
					 | 
				
			||||||
#aria2c_LDFLAGS = -pg
 | 
					#aria2c_LDFLAGS = -pg
 | 
				
			||||||
AM_CPPFLAGS =  -Wall\
 | 
					AM_CPPFLAGS =  -Wall\
 | 
				
			||||||
	-I$(top_srcdir)/lib -I$(top_srcdir)/intl\
 | 
						-I$(top_srcdir)/lib -I$(top_srcdir)/intl\
 | 
				
			||||||
	@LIBGNUTLS_CFLAGS@ @LIBGCRYPT_CFLAGS@ @OPENSSL_CFLAGS@ @XML_CPPFLAGS@\
 | 
					 | 
				
			||||||
	@LIBCARES_CPPFLAGS@ @LIBEXPAT_CPPFLAGS@\
 | 
					 | 
				
			||||||
	@LIBZ_CPPFLAGS@	 @SQLITE3_CFLAGS@\
 | 
					 | 
				
			||||||
	-DLOCALEDIR=\"@localedir@\" -DCA_BUNDLE=\"$(ca_bundle)\" @DEFS@ #-pg
 | 
						-DLOCALEDIR=\"@localedir@\" -DCA_BUNDLE=\"$(ca_bundle)\" @DEFS@ #-pg
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,24 +213,14 @@ aria2c_SOURCES += MetalinkerTest.cc\
 | 
				
			||||||
	MetalinkProcessorTest.cc
 | 
						MetalinkProcessorTest.cc
 | 
				
			||||||
endif # ENABLE_METALINK
 | 
					endif # ENABLE_METALINK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#aria2c_CXXFLAGS = ${CPPUNIT_CFLAGS} -I../src -I../lib -Wall -D_FILE_OFFSET_BITS=64
 | 
					aria2c_LDADD = ../src/libaria2c.a @LIBINTL@ @CPPUNIT_LIBS@
 | 
				
			||||||
#aria2c_LDFLAGS = ${CPPUNIT_LIBS}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
aria2c_LDADD = ../src/libaria2c.a\
 | 
					 | 
				
			||||||
    @LIBINTL@ @LIBGNUTLS_LIBS@\
 | 
					 | 
				
			||||||
	@LIBGCRYPT_LIBS@ @OPENSSL_LIBS@ @XML_LIBS@\
 | 
					 | 
				
			||||||
	@LIBCARES_LIBS@ @LIBEXPAT_LIBS@ @LIBZ_LIBS@\
 | 
					 | 
				
			||||||
	@SQLITE3_LIBS@\
 | 
					 | 
				
			||||||
	${CPPUNIT_LIBS}
 | 
					 | 
				
			||||||
AM_CPPFLAGS =  -Wall\
 | 
					AM_CPPFLAGS =  -Wall\
 | 
				
			||||||
	${CPPUNIT_CFLAGS}\
 | 
					 | 
				
			||||||
	-I$(top_srcdir)/src\
 | 
						-I$(top_srcdir)/src\
 | 
				
			||||||
	-I$(top_srcdir)/lib -I$(top_srcdir)/intl\
 | 
						-I$(top_srcdir)/lib -I$(top_srcdir)/intl\
 | 
				
			||||||
	@LIBGNUTLS_CFLAGS@ @LIBGCRYPT_CFLAGS@ @OPENSSL_CFLAGS@ @XML_CPPFLAGS@\
 | 
					        -DLOCALEDIR=\"$(localedir)\"\
 | 
				
			||||||
	@LIBCARES_CPPFLAGS@ @LIBEXPAT_CPPFLAGS@\
 | 
					 | 
				
			||||||
	@LIBZ_CPPFLAGS@	 @SQLITE3_CFLAGS@ -DLOCALEDIR=\"$(localedir)\"\
 | 
					 | 
				
			||||||
	-DA2_TEST_DIR=\"$(top_srcdir)/test\"\
 | 
						-DA2_TEST_DIR=\"$(top_srcdir)/test\"\
 | 
				
			||||||
	-DA2_TEST_OUT_DIR=\"${a2_test_outdir}\"\
 | 
						-DA2_TEST_OUT_DIR=\"${a2_test_outdir}\"\
 | 
				
			||||||
 | 
						@CPPUNIT_CFLAGS@\
 | 
				
			||||||
	@DEFS@
 | 
						@DEFS@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = 4096chunk.txt\
 | 
					EXTRA_DIST = 4096chunk.txt\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue