Commit cdcc6a01 by Doug Evans

configure.in: Invoke AC_CONFIG_HEADER.

	* configure.in: Invoke AC_CONFIG_HEADER.
	Check for string.h, strings.h, stdlib.h, time.h, unistd.h.
	Check for whether malloc/realloc/free need to be declared.
	(links): Rename config.h to config2.h.
	(AC_OUTPUT): Create stamp-h.

From-SVN: r14488
parent d68b51ef
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
# Initialization and defaults # Initialization and defaults
AC_INIT(tree.c) AC_INIT(tree.c)
AC_CONFIG_HEADER(config.h:config.in)
native_prefix=/usr native_prefix=/usr
remove=rm remove=rm
hard_link=ln hard_link=ln
...@@ -123,6 +125,12 @@ AC_PROG_INSTALL ...@@ -123,6 +125,12 @@ AC_PROG_INSTALL
AC_PROG_CC AC_PROG_CC
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
GCC_NEED_DECLARATION(malloc)
GCC_NEED_DECLARATION(realloc)
GCC_NEED_DECLARATION(free)
# File extensions # File extensions
manext='.1' manext='.1'
objext='.o' objext='.o'
...@@ -2675,8 +2683,10 @@ fi ...@@ -2675,8 +2683,10 @@ fi
# Set up the header files. # Set up the header files.
# $links is the list of header files to create. # $links is the list of header files to create.
# $vars is the list of shell variables with file names to include. # $vars is the list of shell variables with file names to include.
# config2.h is the old config.h. It is included by the new config.h which
# created from config.in. The goal is to simplify the transition to autoconf.
vars="host_xm_file tm_file xm_file build_xm_file" vars="host_xm_file tm_file xm_file build_xm_file"
links="config.h tm.h tconfig.h hconfig.h" links="config2.h tm.h tconfig.h hconfig.h"
rm -f config.bak rm -f config.bak
if [[ -f config.status ]]; then mv -f config.status config.bak; fi if [[ -f config.status ]]; then mv -f config.status config.bak; fi
...@@ -3037,7 +3047,14 @@ fi ...@@ -3037,7 +3047,14 @@ fi
# Create the Makefile # Create the Makefile
# and configure language subdirectories # and configure language subdirectories
AC_OUTPUT(Makefile, AC_OUTPUT(Makefile,
. $srcdir/configure.lang, [
. $srcdir/configure.lang
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
esac
],
[
host='${host}' host='${host}'
build='${build}' build='${build}'
target='${target}' target='${target}'
...@@ -3065,4 +3082,4 @@ host_overrides='${host_overrides}' ...@@ -3065,4 +3082,4 @@ host_overrides='${host_overrides}'
cross_defines='${cross_defines}' cross_defines='${cross_defines}'
cross_overrides='${cross_overrides}' cross_overrides='${cross_overrides}'
build_overrides='${build_overrides}' build_overrides='${build_overrides}'
) ])
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