mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* configure.ac: Fix resolver autoconf code so it works (fails)
properly with uClibc.
This commit is contained in:
parent
5c82303d36
commit
975da08004
@ -1,3 +1,8 @@
|
|||||||
|
2006-07-08 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* configure.ac: Fix resolver autoconf code so it works (fails)
|
||||||
|
properly with uClibc.
|
||||||
|
|
||||||
2006-06-25 Werner Koch <wk@g10code.com>
|
2006-06-25 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
Released 1.4.4.
|
Released 1.4.4.
|
||||||
|
47
configure.ac
47
configure.ac
@ -595,44 +595,47 @@ AC_ARG_ENABLE(dns-cert,
|
|||||||
use_dns_cert=$enableval,use_dns_cert=yes)
|
use_dns_cert=$enableval,use_dns_cert=yes)
|
||||||
|
|
||||||
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
|
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
|
||||||
_srv_save_libs=$LIBS
|
_dns_save_libs=$LIBS
|
||||||
LIBS=""
|
LIBS=""
|
||||||
# the double underscore thing is a glibc-ism?
|
# the double underscore thing is a glibc-ism?
|
||||||
AC_SEARCH_LIBS(res_query,resolv bind,,
|
AC_SEARCH_LIBS(res_query,resolv bind,,
|
||||||
AC_SEARCH_LIBS(__res_query,resolv bind,,use_dns_srv=no))
|
AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
|
||||||
AC_SEARCH_LIBS(dn_expand,resolv bind,,
|
AC_SEARCH_LIBS(dn_expand,resolv bind,,
|
||||||
AC_SEARCH_LIBS(__dn_expand,resolv bind,,use_dns_srv=no))
|
AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
|
||||||
AC_SEARCH_LIBS(dn_skipname,resolv bind,,
|
AC_SEARCH_LIBS(dn_skipname,resolv bind,,
|
||||||
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no))
|
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
|
||||||
|
|
||||||
# Make sure that the BIND 4 resolver interface is workable before
|
if test x"$have_resolver" != xno ; then
|
||||||
# enabling any code that calls it. At some point I'll rewrite the
|
|
||||||
# code to use the BIND 8 resolver API.
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether the resolver is usable])
|
# Make sure that the BIND 4 resolver interface is workable before
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
|
# enabling any code that calls it. At some point I'll rewrite the
|
||||||
|
# code to use the BIND 8 resolver API.
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether the resolver is usable])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
#include <resolv.h>],
|
#include <resolv.h>],
|
||||||
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],have_resolver=yes,have_resolver=no)
|
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],have_resolver=yes,have_resolver=no)
|
||||||
AC_MSG_RESULT($have_resolver)
|
AC_MSG_RESULT($have_resolver)
|
||||||
|
|
||||||
# This is Apple-specific and somewhat bizarre as they changed the
|
# This is Apple-specific and somewhat bizarre as they changed the
|
||||||
# define in bind 8 for some reason.
|
# define in bind 8 for some reason.
|
||||||
|
|
||||||
if test x"$have_resolver" != xyes ; then
|
if test x"$have_resolver" != xyes ; then
|
||||||
AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
|
AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
#include <resolv.h>],
|
#include <resolv.h>],
|
||||||
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],[have_resolver=yes ; need_compat=yes])
|
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes])
|
||||||
AC_MSG_RESULT($have_resolver)
|
AC_MSG_RESULT($have_resolver)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$have_resolver" = xyes ; then
|
if test x"$have_resolver" = xyes ; then
|
||||||
SRVLIBS=$LIBS
|
DNSLIBS=$LIBS
|
||||||
|
|
||||||
if test x"$use_dns_srv" = xyes ; then
|
if test x"$use_dns_srv" = xyes ; then
|
||||||
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
|
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
|
||||||
@ -647,7 +650,7 @@ if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$need_compat" = xyes ; then
|
if test x"$need_compat" = xyes ; then
|
||||||
AC_DEFINE(BIND_8_COMPAT,1,[an Appleism])
|
AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
use_dns_srv=no
|
use_dns_srv=no
|
||||||
@ -655,10 +658,10 @@ if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes || test x"$use_dns
|
|||||||
use_dns_cert=no
|
use_dns_cert=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LIBS=$_srv_save_libs
|
LIBS=$_dns_save_libs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(SRVLIBS)
|
AC_SUBST(DNSLIBS)
|
||||||
|
|
||||||
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
|
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ AM_CPPFLAGS += -DGNUPG_LIBEXECDIR="\"$(libexecdir)/@PACKAGE@\""
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
|
needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
|
||||||
other_libs = $(LIBICONV) $(SRVLIBS) $(LIBINTL) $(CAPLIBS)
|
other_libs = $(LIBICONV) $(DNSLIBS) $(LIBINTL) $(CAPLIBS)
|
||||||
|
|
||||||
bin_PROGRAMS = gpg gpgv
|
bin_PROGRAMS = gpg gpgv
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ gpgkeys_finger_LDADD = ../util/libutil.a @NETLIBS@ $(other_libs) @GETOPT@ @W32LI
|
|||||||
|
|
||||||
if FAKE_CURL
|
if FAKE_CURL
|
||||||
gpgkeys_curl_SOURCES += curl-shim.c curl-shim.h
|
gpgkeys_curl_SOURCES += curl-shim.c curl-shim.h
|
||||||
gpgkeys_curl_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@
|
gpgkeys_curl_LDADD = ../util/libutil.a @NETLIBS@ @DNSLIBS@ $(other_libs) @GETOPT@ @W32LIBS@
|
||||||
gpgkeys_hkp_SOURCES += curl-shim.c curl-shim.h
|
gpgkeys_hkp_SOURCES += curl-shim.c curl-shim.h
|
||||||
gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@
|
gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @DNSLIBS@ $(other_libs) @GETOPT@ @W32LIBS@
|
||||||
else
|
else
|
||||||
gpgkeys_curl_CPPFLAGS = @LIBCURL_CPPFLAGS@
|
gpgkeys_curl_CPPFLAGS = @LIBCURL_CPPFLAGS@
|
||||||
gpgkeys_curl_LDADD = @LIBCURL@ @GETOPT@
|
gpgkeys_curl_LDADD = @LIBCURL@ @GETOPT@
|
||||||
|
@ -58,16 +58,16 @@ libutil_a_LIBADD = @LIBOBJS@
|
|||||||
|
|
||||||
http-test: http.c
|
http-test: http.c
|
||||||
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
||||||
-DTEST -o http-test http.c libutil.a @LIBINTL@ @SRVLIBS@ @CAPLIBS@
|
-DTEST -o http-test http.c libutil.a @LIBINTL@ @DNSLIBS@ @CAPLIBS@
|
||||||
|
|
||||||
srv-test: srv.c
|
srv-test: srv.c
|
||||||
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
||||||
-DTEST -o srv-test srv.c libutil.a @LIBINTL@ @SRVLIBS@ @CAPLIBS@
|
-DTEST -o srv-test srv.c libutil.a @LIBINTL@ @DNSLIBS@ @CAPLIBS@
|
||||||
|
|
||||||
pka-test: pka.c
|
pka-test: pka.c
|
||||||
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
||||||
-DTEST -o pka-test pka.c libutil.a @LIBINTL@ @SRVLIBS@ @CAPLIBS@
|
-DTEST -o pka-test pka.c libutil.a @LIBINTL@ @DNSLIBS@ @CAPLIBS@
|
||||||
|
|
||||||
cert-test: cert.c
|
cert-test: cert.c
|
||||||
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
cc -DHAVE_CONFIG_H -I. -I. -I.. $(INCLUDES) $(LDFLAGS) -g -Wall \
|
||||||
-DTEST -o cert-test cert.c libutil.a @LIBINTL@ @SRVLIBS@ @CAPLIBS@
|
-DTEST -o cert-test cert.c libutil.a @LIBINTL@ @DNSLIBS@ @CAPLIBS@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user