Commit 5559dc0a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Updated for automake-1.5.1 and autoconf-2.57. Removed

DPKG_CACHED_TRY_COMPILE.  Removed all dynamic linking support.
Removed support for client programs.  Use AC_C_INLINE instead of a
hand-coded test for the same thing.  Add AH_VERBATIM for config.h.
Only output Makefile and src/Makefile.
parent b9eb6029
......@@ -21,45 +21,9 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_INIT(src/adns.h)
AC_CONFIG_HEADER(src/config.h)
dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
define(DPKG_CACHED_TRY_COMPILE,[
AC_MSG_CHECKING($1)
AC_CACHE_VAL($2,[
AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
])
if test "x$$2" = xyes; then
true
$5
else
true
$6
fi
])
AC_MSG_CHECKING(whether you requested dynamic linking)
AC_SUBST(ENABLE_DYNAMIC)
AC_ARG_ENABLE(dynamic,
[ --disable-dynamic use static linking
--enable-dynamic[=elf] create and use ELF dynamic library (default)],
[ case "$enableval" in
elf|yes)
ENABLE_DYNAMIC=elf
AC_MSG_RESULT([yes (ELF)])
;;
no) ENABLE_DYNAMIC=no
AC_MSG_RESULT(no)
;;
*) AC_MSG_ERROR(
["invalid value $enableval for --enable-dynamic, try yes or elf"])
;;
esac
],[
ENABLE_DYNAMIC=elf
AC_MSG_RESULT([yes, by default])
])
AC_INIT([adns], [1.0-lyskom-server])
AC_CONFIG_HEADERS([src/config.h])
AM_INIT_AUTOMAKE([adns], [1.0])
AC_PROG_CC
AC_PROG_CPP
......@@ -70,15 +34,6 @@ AC_CHECK_FUNCS(poll)
ADNS_C_GETFUNC(socket,socket)
ADNS_C_GETFUNC(inet_ntoa,nsl)
PROGS_IF_TSEARCH=adnsresfilter
AC_SUBST(PROGS_HAVE_TSEARCH)
AC_CHECK_FUNC(tsearch,[
PROGS_HAVE_TSEARCH=$PROGS_IF_TSEARCH
],[
PROGS_HAVE_TSEARCH='';
AC_MSG_WARN([tsearch missing - not building client program(s) $PROGS_IF_TSEARCH])
])
AC_MSG_CHECKING(for INADDR_LOOPBACK)
AC_CACHE_VAL(adns_cv_decl_inaddrloopback,[
AC_TRY_COMPILE([
......@@ -106,11 +61,7 @@ ADNS_C_GETFUNC(inet_aton,resolv,[
AC_MSG_WARN([inet_aton is in libresolv, urgh. Must use -lresolv.])
])
DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,,
[} inline int foo (int x) {],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_INLINE),
AC_MSG_RESULT(no))
AC_C_INLINE
ADNS_C_GCCATTRIB
AC_CHECK_HEADERS(sys/select.h)
......@@ -123,25 +74,75 @@ else
WARNS=
fi
AC_SUBST(SHLIBCC)
AC_SUBST(MKSHLIB_1)
AC_SUBST(MKSHLIB_2)
AC_SUBST(MKSHLIB_3)
AC_SUBST(SHLIBFORLINK)
AC_SUBST(SHLIBFILE)
AC_SUBST(SHLIBSONAME)
SHLIBFORLINK='libadns.so'
SHLIBSONAME='$(SHLIBFORLINK).$(MAJOR)'
SHLIBFILE='$(SHLIBSONAME).$(MINOR)'
SHLIBCC='$(CC) $(CFLAGS) -fpic'
MKSHLIB_1='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME) -o'
MKSHLIB_2=''
MKSHLIB_3='-lc'
AH_VERBATIM([LYSKOM_ADNS_EVERYTHING],
[/* Include poll.h. */
#ifdef HAVE_POLL
#include <sys/poll.h>
#else
/* kludge it up */
struct pollfd { int fd; short events; short revents; };
#define POLLIN 1
#define POLLPRI 2
#define POLLOUT 4
#endif
/* GNU C attributes. */
#ifndef FUNCATTR
#ifdef HAVE_GNUC25_ATTRIB
#define FUNCATTR(x) __attribute__(x)
#else
#define FUNCATTR(x)
#endif
#endif
/* GNU C printf formats, or null. */
#ifndef ATTRPRINTF
#ifdef HAVE_GNUC25_PRINTFFORMAT
#define ATTRPRINTF(si,tc) format(printf,si,tc)
#else
#define ATTRPRINTF(si,tc)
#endif
#endif
#ifndef PRINTFFORMAT
#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
#endif
/* GNU C nonreturning functions, or null. */
#ifndef ATTRNORETURN
#ifdef HAVE_GNUC25_NORETURN
#define ATTRNORETURN noreturn
#else
#define ATTRNORETURN
#endif
#endif
#ifndef NONRETURNING
#define NONRETURNING FUNCATTR((ATTRNORETURN))
#endif
/* Combination of both the above. */
#ifndef NONRETURNPRINTFFORMAT
#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
#endif
/* GNU C constant functions, or null. */
#ifndef ATTRCONST
#ifdef HAVE_GNUC25_CONST
#define ATTRCONST const
#else
#define ATTRCONST
#endif
#endif
#ifndef CONSTANT
#define CONSTANT FUNCATTR((ATTRCONST))
#endif
#ifdef HAVEUSE_RPCTYPES_H
#include <rpc/types.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
])
AC_OUTPUT(
settings.make Makefile
src/Makefile client/Makefile dynamic/Makefile regress/Makefile
)
AC_OUTPUT(Makefile src/Makefile)
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