option.cc: Include unistd.h, to pull in the prototype for access(). This was

preventing OpenBSD 4 from building.

acprep (CXXFLAGS): Don't use the compile flag -Wno-long-double except on OS X.
This commit is contained in:
John Wiegley 2008-05-07 04:19:37 -04:00
parent 9fb55716c0
commit 225338d784
2 changed files with 26 additions and 10 deletions

35
acprep
View file

@ -27,34 +27,49 @@ fi
INCDIRS="-I/opt/local/include -I/usr/local/include -I/usr/include/httpd/xml" INCDIRS="-I/opt/local/include -I/usr/local/include -I/usr/include/httpd/xml"
INCDIRS="$INCDIRS -I/usr/include/python2.5" INCDIRS="$INCDIRS -I/usr/include/python2.5"
INCDIRS="$INCDIRS -Wno-long-double"
LIBDIRS="-L/opt/local/lib -L/usr/local/lib" LIBDIRS="-L/opt/local/lib -L/usr/local/lib"
SYSTEM=`uname -s`
if [ $SYSTEM = Linux ]; then
CXXFLAGS="-pthread"
elif [ $SYSTEM = Solaris ]; then
CXXFLAGS="-pthreads"
elif [ $SYSTEM = Darwin ]; then
#CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CXXFLAGS="$CXXFLAGS -Wno-long-double"
#LIBDIRS="$LIBDIRS -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
else
CXXFLAGS=""
fi
if [ "$1" = "--debug" ]; then if [ "$1" = "--debug" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
--enable-debug --enable-python "$@" CXXFLAGS="$CXXFLAGS -g" --enable-debug --enable-python "$@"
elif [ "$1" = "--opt" ]; then elif [ "$1" = "--opt" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@"
elif [ "$1" = "--flat-opt" ]; then elif [ "$1" = "--flat-opt" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450" "$@" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450" "$@"
elif [ "$1" = "--safe-opt" ]; then elif [ "$1" = "--safe-opt" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@"
elif [ "$1" = "--perf" ]; then elif [ "$1" = "--perf" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g -pg" "$@" $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g -pg" "$@"
elif [ "$1" = "--python" ]; then elif [ "$1" = "--python" ]; then
shift 1 shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
--enable-python "$@" CXXFLAGS="$CXXFLAGS -g" --enable-python "$@"
else else
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" "$@" $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g" "$@"
fi fi
rm -f AUTHORS COPYING rm -f AUTHORS COPYING

View file

@ -6,6 +6,7 @@
#include <iostream> #include <iostream>
#include <cstdarg> #include <cstdarg>
#include <unistd.h>
#include "util.h" #include "util.h"