argp-standalone/configure.in

60 lines
1.4 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
dnl This configure.in is only for building a standalone argp library.
AC_INIT(argp-ba.c)
AM_INIT_AUTOMAKE(argp, standalone-1.0)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AM_PROG_CC_STDC
if test "x$am_cv_prog_cc_stdc" = xno ; then
AC_ERROR([the C compiler doesn't handle ANSI-C])
fi
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h malloc.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror)
AC_REPLACE_FUNCS(mempcpy strndup strchrnul)
AC_CHECK_FUNCS(flockfile putc_unlocked)
AC_CHECK_FUNCS(fputs_unlocked fwrite_unlocked)
dnl Used only by argp-test.c, so don't use AC_REPLACE_FUNCS.
AC_CHECK_FUNCS(strdup asprintf)
ARGP_CHECK_VAR(program_invocation_name, [#include <errno.h>])
ARGP_CHECK_VAR(program_invocation_short_name, [#include <errno.h>])
# Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then
CFLAGS="$CFLAGS -ggdb3 -Wall -W \
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \
-Waggregate-return \
-Wpointer-arith -Wbad-function-cast -Wnested-externs"
fi
CPPFLAGS="$CPPFLAGS -I$srcdir"
AC_SUBST(LIBOBJS)
AC_OUTPUT(Makefile)