diff options
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | src/Makefile.am | 23 |
2 files changed, 22 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 6b0b290d2c..bc9ba4aa39 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,15 @@ gl_EARLY AM_PROG_AS AM_PROG_AR AC_PROG_CXX +AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [/bin/true]) + +if test x"$AUTOGEN" = "x/bin/true"; then + AC_MSG_WARN([[ +*** +*** autogen not found. Will not link against libopts. +*** ]]) +NEED_LIBOPTS_DIR=true +fi # For includes/gnutls/gnutls.h.in. AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`) @@ -334,10 +343,6 @@ fi AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no") -enable_local_libopts=yes -dnl PKG_CHECK_MODULES([autoopts], autoopts >= 36.2.11,, [enable_local_libopts=yes]) - -NEED_LIBOPTS_DIR=true LIBOPTS_CHECK([src/libopts]) AC_CHECK_TYPE(ssize_t, diff --git a/src/Makefile.am b/src/Makefile.am index 7343e30fa6..05aab04a8c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,10 @@ SUBDIRS += crywrap endif if NEED_LIBOPTS +LIBOPTS = ../libopts/libopts.a SUBDIRS += libopts +else +LIBOPTS = $(LIBOPTS_LDADD) endif EXTRA_DIST = args-std.def @@ -66,7 +69,7 @@ noinst_LTLIBRARIES = if ENABLE_SRP srptool_SOURCES = srptool.c -srptool_LDADD = ../lib/libgnutls.la libcmd-srp.la $(LIBOPTS_LDADD) ../gl/libgnu.la +srptool_LDADD = ../lib/libgnutls.la libcmd-srp.la $(LIBOPTS) ../gl/libgnu.la srptool_LDADD += $(LTLIBINTL) noinst_LTLIBRARIES += libcmd-srp.la libcmd_srp_la_CFLAGS = @@ -74,7 +77,7 @@ libcmd_srp_la_SOURCES = srptool-args.def srptool-args.c srptool-args.h endif psktool_SOURCES = psk.c -psktool_LDADD = ../lib/libgnutls.la libcmd-psk.la $(LIBOPTS_LDADD) ../gl/libgnu.la +psktool_LDADD = ../lib/libgnutls.la libcmd-psk.la $(LIBOPTS) ../gl/libgnu.la psktool_LDADD += $(LTLIBINTL) noinst_LTLIBRARIES += libcmd-psk.la libcmd_psk_la_CFLAGS = @@ -85,7 +88,7 @@ if ENABLE_OCSP ocsptool_SOURCES = ocsptool.c ocsptool-common.h ocsptool-common.c \ socket.c socket.h -ocsptool_LDADD = ../lib/libgnutls.la libcmd-ocsp.la $(LIBOPTS_LDADD) ../gl/libgnu.la +ocsptool_LDADD = ../lib/libgnutls.la libcmd-ocsp.la $(LIBOPTS) ../gl/libgnu.la ocsptool_LDADD += $(LTLIBINTL) $(GETADDRINFO_LIB) noinst_LTLIBRARIES += libcmd-ocsp.la libcmd_ocsp_la_CFLAGS = @@ -98,7 +101,7 @@ gnutls_serv_SOURCES = \ common.h common.c \ certtool-common.h gnutls_serv_LDADD = ../lib/libgnutls.la -gnutls_serv_LDADD += libcmd-serv.la $(LIBOPTS_LDADD) ../gl/libgnu.la +gnutls_serv_LDADD += libcmd-serv.la $(LIBOPTS) ../gl/libgnu.la gnutls_serv_LDADD += $(LTLIBINTL) gnutls_serv_LDADD += $(LIBSOCKET) $(GETADDRINFO_LIB) noinst_LTLIBRARIES += libcmd-serv.la @@ -116,7 +119,7 @@ gnutls_cli_LDADD = ../lib/libgnutls.la if ENABLE_DANE gnutls_cli_LDADD += ../libdane/libgnutls-dane.la endif -gnutls_cli_LDADD += libcmd-cli.la $(LIBOPTS_LDADD) ../gl/libgnu.la $(LTLIBINTL) +gnutls_cli_LDADD += libcmd-cli.la $(LIBOPTS) ../gl/libgnu.la $(LTLIBINTL) gnutls_cli_LDADD += $(LIBSOCKET) $(GETADDRINFO_LIB) $(LIB_CLOCK_GETTIME) \ $(SERVENT_LIB) noinst_LTLIBRARIES += libcmd-cli.la @@ -128,7 +131,7 @@ endif gnutls_cli_debug_SOURCES = cli-debug.c tests.h tests.c \ socket.c socket.h common.h common.c gnutls_cli_debug_LDADD = ../lib/libgnutls.la libcmd-cli-debug.la -gnutls_cli_debug_LDADD += $(LIBOPTS_LDADD) ../gl/libgnu.la +gnutls_cli_debug_LDADD += $(LIBOPTS) ../gl/libgnu.la gnutls_cli_debug_LDADD += $(LTLIBINTL) gnutls_cli_debug_LDADD += $(LIBSOCKET) $(GETADDRINFO_LIB) noinst_LTLIBRARIES += libcmd-cli-debug.la @@ -145,7 +148,7 @@ noinst_LTLIBRARIES += libcmd-certtool.la libcmd_certtool_la_CFLAGS = libcmd_certtool_la_SOURCES = certtool-args.c certtool-args.def certtool-args.h \ certtool-cfg.h certtool-cfg.c -libcmd_certtool_la_LIBADD = $(LIBOPTS_LDADD) ../gl/libgnu.la ../lib/libgnutls.la +libcmd_certtool_la_LIBADD = $(LIBOPTS) ../gl/libgnu.la ../lib/libgnutls.la libcmd_certtool_la_LIBADD += $(LTLIBINTL) libcmd_certtool_la_LIBADD += $(LTLIBREADLINE) libcmd_certtool_la_LIBADD += $(INET_PTON_LIB) @@ -161,7 +164,7 @@ noinst_LTLIBRARIES += libcmd-danetool.la libcmd_danetool_la_CFLAGS = libcmd_danetool_la_SOURCES = danetool-args.c danetool-args.def danetool-args.h \ certtool-cfg.h certtool-cfg.c -libcmd_danetool_la_LIBADD = $(LIBOPTS_LDADD) ../gl/libgnu.la ../lib/libgnutls.la +libcmd_danetool_la_LIBADD = $(LIBOPTS) ../gl/libgnu.la ../lib/libgnutls.la libcmd_danetool_la_LIBADD += $(LTLIBINTL) libcmd_danetool_la_LIBADD += $(LTLIBREADLINE) libcmd_danetool_la_LIBADD += $(INET_PTON_LIB) @@ -172,7 +175,7 @@ if ENABLE_PKCS11 p11tool_SOURCES = p11tool-args.def p11tool.c pkcs11.c certtool-common.c \ certtool-extras.c p11tool.h common.c p11tool_LDADD = ../lib/libgnutls.la -p11tool_LDADD += libcmd-p11tool.la $(LIBOPTS_LDADD) ../gl/libgnu.la +p11tool_LDADD += libcmd-p11tool.la $(LIBOPTS) ../gl/libgnu.la p11tool_LDADD += $(LTLIBINTL) noinst_LTLIBRARIES += libcmd-p11tool.la @@ -188,7 +191,7 @@ if ENABLE_TROUSERS tpmtool_SOURCES = tpmtool-args.def tpmtool.c certtool-common.c certtool-extras.c common.c tpmtool_LDADD = ../lib/libgnutls.la -tpmtool_LDADD += libcmd-tpmtool.la $(LIBOPTS_LDADD) ../gl/libgnu.la +tpmtool_LDADD += libcmd-tpmtool.la $(LIBOPTS) ../gl/libgnu.la tpmtool_LDADD += $(LTLIBINTL) noinst_LTLIBRARIES += libcmd-tpmtool.la |