Makefiles are BSD compatible, extension included in make dist.

This commit is contained in:
W.C.A. Wijngaards 2014-02-04 10:14:46 +01:00
parent cead404fc6
commit 9e5afa0b78
4 changed files with 12 additions and 8 deletions

View File

@ -58,6 +58,7 @@ $(distdir):
mkdir -p $(distdir)/src/getdns
mkdir -p $(distdir)/src/test
mkdir -p $(distdir)/src/example
mkdir -p $(distdir)/src/extension
mkdir -p $(distdir)/doc
cp $(srcdir)/configure.ac $(distdir)
cp $(srcdir)/configure $(distdir)

4
configure vendored
View File

@ -634,6 +634,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
EXTENSION_LIBEVENT_OBJ
have_libevent
DOXYGEN
INSTALL_DATA
@ -11144,6 +11145,7 @@ _ACEOF
have_libevent=1
EXTENSION_LIBEVENT_OBJ="extension/libevent.lo"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_loop" >&5
$as_echo_n "checking for library containing event_loop... " >&6; }
if ${ac_cv_search_event_loop+:} false; then :
@ -11215,10 +11217,12 @@ done
else
have_libevent=0
EXTENSION_LIBEVENT_OBJ=""
fi
ac_config_files="$ac_config_files Makefile src/Makefile src/getdns/Makefile src/example/Makefile src/test/Makefile doc/Makefile"
if test -n "$DOXYGEN"

View File

@ -163,6 +163,7 @@ AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
have_libevent=1
EXTENSION_LIBEVENT_OBJ="extension/libevent.lo"
AC_SEARCH_LIBS([event_loop],
[event_core event],
[AC_DEFINE([HAVE_LIBEVENT], [1], [Define to 1 to enable the libevent extension])]
@ -175,9 +176,11 @@ AC_SEARCH_LIBS([event_loop],
#define event_base_new event_init
#endif
])],
[have_libevent=0])
[have_libevent=0]
[EXTENSION_LIBEVENT_OBJ=""])
AC_SUBST(have_libevent)
AC_SUBST(EXTENSION_LIBEVENT_OBJ)
AC_CONFIG_FILES([Makefile src/Makefile src/getdns/Makefile src/example/Makefile src/test/Makefile doc/Makefile])
if [ test -n "$DOXYGEN" ]
then AC_CONFIG_FILES([src/Doxyfile])

View File

@ -32,13 +32,11 @@ VPATH = @srcdir@
CC=gcc
CFLAGS=@CFLAGS@ -Wall -I$(srcdir)/ -I/usr/local/include -std=c99
LDFLAGS=@LDFLAGS@ @LIBS@
EXTENSION_LIBEVENT_OBJ=@EXTENSION_LIBEVENT_OBJ@
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
hostname.lo service.lo request-internal.lo validate_dnssec.lo \
util-internal.lo getdns_error.lo rr-dict.lo validation-chain.lo
ifeq ($(have_libevent),1)
GETDNS_OBJ += extension/libevent.lo
endif
GETDNS_OBJ+=$(EXTENSION_LIBEVENT_OBJ)
.SUFFIXES: .c .o .a .lo .h
@ -56,9 +54,7 @@ install: libgetdns.la
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns
$(INSTALL) -m 644 $(srcdir)/getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h
ifeq ($(have_libevent),1)
$(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/
endif
if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; fi
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)