Do not depend on automake/libtool. (They are now optional.)
This commit is contained in:
parent
02469fb735
commit
6a36011c6e
6 changed files with 162 additions and 5 deletions
12
bootstrap
12
bootstrap
|
@ -2,10 +2,12 @@
|
|||
|
||||
set -x
|
||||
|
||||
## aclocal warns way too much!
|
||||
aclocal-1.8 2>&1 | grep -v '.usr.share.aclocal.'
|
||||
# -I config
|
||||
rm configure.in
|
||||
ln -s configure.in.lite configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal -I m4
|
||||
autoheader
|
||||
automake-1.8 --add-missing --copy
|
||||
#automake
|
||||
autoconf
|
||||
./configure --quiet
|
||||
|
||||
|
|
119
configure.in.lite
Normal file
119
configure.in.lite
Normal file
|
@ -0,0 +1,119 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([Stasis],[0.1],[sears@cs.berkeley.edu])
|
||||
#AM_INIT_AUTOMAKE() #hello,0.1)
|
||||
#AM_INIT_AUTOMAKE([subdir-objects]) # @todo use subdir-objects once transition to libtool is done.
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
#AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
#AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
## Need AC_PROG_LIBTOOL
|
||||
#AC_PROG_LIBTOOL
|
||||
AC_PROG_AWK
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_YACC
|
||||
AC_PROG_LEX
|
||||
# Checks for libraries.
|
||||
|
||||
# For SWIG & Python
|
||||
# AC_PROG_LIBTOOL
|
||||
#AM_PATH_PYTHON(2.3)
|
||||
AC_PROG_SWIG(1.3)
|
||||
SWIG_ENABLE_CXX
|
||||
SWIG_PYTHON
|
||||
|
||||
# Linux has a broken O_DIRECT flag, but we allow people to override it from
|
||||
# the command line.
|
||||
test_host_prw=yes
|
||||
AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>]], [[
|
||||
open("a", O_RDONLY | O_DIRECT, 0);
|
||||
]])],[db_cv_open_o_direct=yes; test_host_prw=no],[db_cv_open_o_direct=no])])
|
||||
if test "$test_host_prw" = "no" -a "$db_cv_open_o_direct" = "yes"; then
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
db_cv_open_o_direct=no;
|
||||
AC_MSG_WARN(
|
||||
[O_DIRECT interface ignored on $host_os-$host_vendor.]);;
|
||||
esac
|
||||
fi
|
||||
if test "$db_cv_open_o_direct" = "yes"; then
|
||||
AC_DEFINE(HAVE_O_DIRECT)
|
||||
AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([check], [suite_create])
|
||||
AC_CHECK_LIB([check], [suite_create],
|
||||
have_libcheck=yes,
|
||||
have_libcheck=no)
|
||||
|
||||
#if test x$have_libcheck = xyes ; then
|
||||
##AM_CONDITIONAL(HAVE_LIBCHECK, true)
|
||||
#else
|
||||
##AM_CONDITIONAL(HAVE_LIBCHECK, false)
|
||||
#AC_MSG_WARN([Check not found; cannot run unit tests!])
|
||||
#fi
|
||||
|
||||
|
||||
AC_CHECK_LIB([m], [sqrt])
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
|
||||
|
||||
AC_CONFIG_DB
|
||||
|
||||
#AM_CONDITIONAL(DB_ENABLED, test $DB_ENABLED = 1)
|
||||
|
||||
if test x$build_benchmarks = xyes ; then
|
||||
if test $DB_ENABLED = 0; then
|
||||
AC_MSG_WARN([Could not find Berkeley DB; some benchmarks will not be built])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([intl], [bindtextdomain])
|
||||
AC_CHECK_LIB([c], [bindtextdomain])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_FUNC_ALLOCA
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h errno.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
#AC_TYPE_INT64_T
|
||||
#AC_TYPE_UINT64_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
#AC_TYPE_SSIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
#enable largefile support.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
## Assume we have these, and that they work.
|
||||
## (otherwise, bad stuff happens sometimes)
|
||||
#AC_FUNC_MALLOC
|
||||
#AC_FUNC_REALLOC
|
||||
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([bzero fdatasync floor ftruncate getcwd gettimeofday inet_ntoa localtime_r memmove memset mkdir posix_memalign pow powl socket sqrt strchr strdup strerror strrchr strstr strtol strtoul sync_file_range tcase_set_timeout])
|
||||
|
||||
AC_OUTPUT
|
32
reconf
32
reconf
|
@ -17,6 +17,8 @@
|
|||
qq(
|
||||
|
||||
#!/bin/sh
|
||||
rm configure.in
|
||||
ln -s configure.in.automake configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal -I m4
|
||||
|
@ -32,6 +34,8 @@ exit
|
|||
qq(
|
||||
|
||||
#!/bin/sh
|
||||
rm configure.in
|
||||
ln -s configure.in.automake configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal-1.8 -I m4
|
||||
|
@ -43,6 +47,30 @@ exit
|
|||
|
||||
);
|
||||
#
|
||||
# The following uses system defaults, but no longer depends on libtool or automake.
|
||||
# It is the recommended approach.
|
||||
#
|
||||
qq(
|
||||
#!/bin/sh
|
||||
rm configure.in
|
||||
ln -s configure.in.lite configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
autoheader
|
||||
);
|
||||
#
|
||||
|
||||
warn qq(
|
||||
This script is obsolete; stasis no longer requires automake or libtool.
|
||||
|
||||
To build with cmake, run:
|
||||
|
||||
./bootstrap
|
||||
mkdir build ; cd build ; cmake ..
|
||||
make -j4
|
||||
);
|
||||
|
||||
my $aclocal_base = `which aclocal` || die "aclocal not found!";
|
||||
my $automake_base = `which automake` || die "automake not found!";
|
||||
|
@ -92,4 +120,8 @@ Proceeding with system's default automake. Expect trouble.
|
|||
$ENV{ACLOCAL} = "$aclocal_base-$version";
|
||||
$ENV{AUTOMAKE} = "$automake_base-$version";
|
||||
}
|
||||
|
||||
system("rm configure.in");
|
||||
system("ln -s configure.in.automake configure.in");
|
||||
|
||||
system ("autoreconf -i", @ARGV);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
echo WARNING: This script is obsolete, but sometimes works when reconf does not.
|
||||
rm configure.in
|
||||
ln -s configure.in.automake configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal-1.8 -I m4
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
echo WARNING: This script is obsolete, but sometimes works when reconf does not.
|
||||
rm configure.in
|
||||
ln -s configure.in.automake configure.in
|
||||
rm -f config.cache
|
||||
rm -f acconfig.h
|
||||
aclocal-1.9 -I m4
|
||||
|
|
Loading…
Reference in a new issue