Commit a994689d authored by Niels Möller's avatar Niels Möller
Browse files

Updated for current autoconf and automake.

Fixed AC_CONFIG_HEADER call.
Use AC_GNU_SOURCE.
Use AC_CHECK_DECLS to check for program_invocation_name and
program_invocation_short_name.

Rev: src/argp/configure.ac:1.9
parent aa89ee88
dnl Process this file with autoconf to produce a configure script.
dnl This configure.ac is only for building a standalone argp library.
AC_INIT([argp], [standalone-1.2])
AC_CONFIG_SRCDIR([argp-ba.c])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AC_PREREQ(2.54)
AC_INIT(argp-ba.c)
AM_INIT_AUTOMAKE(argp, standalone-1.2)
AM_CONFIG_HEADER(config.h)
# GNU libc defaults to supplying the ISO C library functions only. The
# _GNU_SOURCE define enables these extensions, in particular we want
# errno.h to declare program_invocation_name. Enable it on all
# systems; no problems have been reported with it so far.
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_GNU_SOURCE
dnl Checks for programs.
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
......@@ -24,18 +22,18 @@ 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.
# Checks for libraries.
dnl Checks for header files.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h malloc.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
dnl Checks for library functions.
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror)
......@@ -46,16 +44,11 @@ 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.
# Used only by argp-test.c, so don't use AC_REPLACE_FUNCS.
AC_CHECK_FUNCS(strdup asprintf)
AH_TEMPLATE([HAVE_PROGRAM_INVOCATION_NAME],
[Define if the variable exists (usually provided by the linker).])
AH_TEMPLATE([HAVE_PROGRAM_INVOCATION_SHORT_NAME],
[Define if the variable exists (usually provided by the linker).])
ARGP_CHECK_VAR(program_invocation_name, [#include <errno.h>])
ARGP_CHECK_VAR(program_invocation_short_name, [#include <errno.h>])
AC_CHECK_DECLS([program_invocation_name, 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
......
Supports Markdown
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