summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
committerCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
commitf1373cdf3c33752ec326c9b79378057367836c4c (patch)
tree23ff4c261920076e35ad67354f7e8385fdd7255d /configure.ac
parent4bf85961c09d34336f9b081cd923a9f59fcf5266 (diff)
downloaddistcc-git-f1373cdf3c33752ec326c9b79378057367836c4c.tar.gz
These changes are enough to get code to compile, and at least some of
the unittests to pass, on FreeBSD 6.0, Solaris 10 x86, and OS X Leopard. You have to use gmake instead of standard bsd make, though, because neither bsd nor solari make understand 'include */*.d' and 'CFLAGS += $(POPT_FLAGS).' These may be fixable later. Most changes fall into four categories: 1) #include differences 2) New errors due to some #ifdef paths being taken differently 3) Undefined functions (see, eg, the new HAVE_STRSEP) 4) Type differences (eg tv_usec is an int on os x, not a long int) As one concrete example, snprintf.c is an empty file on linux, where all the functionality is part of glibc. But on Solaris, some of its functionality is useful. This turned up a bug where if you have vsnprintf on your system but not vasnprintf, then dopr() was not being used but was being defined, leading to an "unused static function" warning in gcc. As another, solaris would complain about "index" being used as a variable, since it's also a function name. The var was renamed idx. Tested by compiling on FreeBSD, Solaris 10, and OS X leopard (x86). I also compiled and ran unittests under Linux Ubuntu, to make sure this change didn't break anything there. Reviewed by fergus@google.com
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index c2b95ea..bbe5747 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,13 +168,13 @@ then
-W -Wall -Wimplicit -Wuninitialized \
-Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings \
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
--Wnested-externs -Wpointer-arith -Wmissing-declarations"
+-Wnested-externs -Wmissing-declarations"
# Would like -Wunreachable-code here, but it generates too many false
# positives.
# We want warnings to be treated as errors.
# Note that we can't include this in CFLAGS,
- # because that would effect the configure tests,
+ # because that would affect the configure tests,
# causing some of the tests to fail when they should succeed.
WERROR_CFLAGS="-Werror"
@@ -207,8 +207,9 @@ AC_PROG_INSTALL
# We prefer to use the latest Python, but try to find an explicit version
# to make sure we don't get a really old one.
# The include server requires python 2.4 or later.
-AC_CHECK_PROGS(PYTHON, [python2.4 python-2 python])
-AC_ARG_VAR(PYTHON, [Python interpreter])
+# TODO(csilvers): check via python -V (and use AC_PATH_PROGS below)
+AC_CHECK_PROGS(PYTHON, [python2.4 python-2.4 python])
+AC_ARG_VAR(PYTHON, [Python interpreter (must be >= Python 2.4)])
# NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present
# in autoconf 2.53.
@@ -317,11 +318,11 @@ CPPFLAGS="$CPPFLAGS -I$srcdir/src"
AC_CHECK_FUNCS([getpagesize])
AC_CHECK_FUNCS([sendfile setsid flock lockf hstrerror strerror setuid setreuid])
-AC_CHECK_FUNCS([getuid geteuid mcheck wait4 wait3 waitpid setgroups getcwd])
-AC_CHECK_FUNCS([snprintf vsnprintf vasprintf asprintf getcwd getwd])
+AC_CHECK_FUNCS([getuid geteuid mcheck wait4 wait3 waitpid setgroups])
+AC_CHECK_FUNCS([snprintf vsnprintf vasprintf asprintf getcwd getwd mkdtemp])
AC_CHECK_FUNCS([getrusage strsignal gettimeofday])
AC_CHECK_FUNCS([getaddrinfo getnameinfo inet_ntop inet_ntoa])
-AC_CHECK_FUNCS([strndup mmap strlcpy])
+AC_CHECK_FUNCS([strndup strsep mmap strlcpy])
AC_CHECK_FUNCS([getloadavg])