From e74272332e4a0bdeddf812a137823919d31a9d58 Mon Sep 17 00:00:00 2001 From: moritz Date: Sat, 24 Feb 2007 21:50:54 +0000 Subject: [PATCH] Add several checks that we need now, i.e. very soon. git-svn-id: https://svn.xiph.org/trunk/ezstream@12539 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- configure.in | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/configure.in b/configure.in index 2274a75..11dd1eb 100644 --- a/configure.in +++ b/configure.in @@ -5,6 +5,7 @@ AC_PREREQ(2.61) AC_CONFIG_SRCDIR(src/ezstream.c) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS(src/config.h) +AC_CONFIG_LIBOBJ_DIR(src) AM_MAINTAINER_MODE AC_USE_SYSTEM_EXTENSIONS @@ -37,8 +38,42 @@ else fi +dnl MISC SYSTEM CHARACTERISTICS + +dnl __progname check adapted from OpenNTPd-portable's configure.ac +AC_MSG_CHECKING([whether libc defines __progname]) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[extern char *__progname; printf("%s\n", __progname); ]])], + [ac_cv_libc_defines___progname="yes"], + [ac_cv_libc_defines___progname="no"] +) +if test x"$ac_cv_libc_defines___progname" = "xyes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE___PROGNAME, 1, [Define whether libc defines __progname]) +else + AC_MSG_RESULT([no]) +fi + +AC_C_CONST +AC_TYPE_SIZE_T + + dnl USEFUL HEADERS +AC_CHECK_HEADERS(sys/time.h paths.h signal.h) + + +dnl LIBRARY FUNCTIONS + +AC_CHECK_FUNCS(arc4random gettimeofday random srandomdev) +AC_REPLACE_FUNCS(getopt strlcat strlcpy) +if test x"$ac_cv_header_signal_h" = "xyes"; then + AC_CHECK_FUNCS([sigaction], [ + AC_DEFINE(HAVE_SIGNALS, 1, [Define whether we have BSD signals]) + ], [], [#include ]) +fi + dnl CONFIGURE OPTIONS