Updated the build process in acprep and configure.in to run without issues,

and to work with the Buildbot.
This commit is contained in:
John Wiegley 2008-05-07 02:01:57 -04:00
parent 67b257a441
commit 7603e3f8f2
2 changed files with 65 additions and 52 deletions

59
acprep
View file

@ -1,47 +1,60 @@
#!/bin/sh #!/bin/sh
export AUTOCONF_VERSION=2.61
export AUTOMAKE_VERSION=1.9
touch AUTHORS COPYING touch AUTHORS COPYING
if which glibtoolize > /dev/null 2>&1; then cmd=$(which glibtoolize 2>&1)
glibtoolize --automake -f -c if [ -x "$cmd" ]; then
else export LIBTOOLIZE="$cmd"
libtoolize --automake -f -c
fi fi
aclocal autoreconf --force --install
autoheader
if [ "$1" = "--dist" ]; then
shift 1
automake -a -c -f -i
else
automake -a -c -f
fi
autoconf
INCDIRS="-I/sw/include -I/sw/include/boost -I/usr/include/httpd/xml" HERE="$PWD"
#INCDIRS="$INCDIRS -I/sw/include/libofx"
INCDIRS="$INCDIRS -I/usr/include/python2.3" if [ ! "$1" = "--local" ]; then
if [ -d "$HOME/Products" ]; then
projdir="$HOME/Products/$(basename $HERE)"
if [ ! -d "$projdir" ]; then
mkdir -p "$projdir"
fi
cd "$projdir" || (echo "Cannot change to $projdir"; exit 1)
fi
else
shift 1
fi
INCDIRS="-I/opt/local/include -I/usr/local/include -I/usr/include/httpd/xml"
INCDIRS="$INCDIRS -I/usr/include/python2.5"
INCDIRS="$INCDIRS -Wno-long-double" INCDIRS="$INCDIRS -Wno-long-double"
LIBDIRS="-L/sw/lib -L/usr/local/lib -L/usr/lib/python2.3/config" LIBDIRS="-L/opt/local/lib -L/usr/local/lib"
if [ "$1" = "--debug" ]; then if [ "$1" = "--debug" ]; then
shift 1 shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \
--enable-debug --enable-python "$@" --enable-debug --enable-python "$@"
elif [ "$1" = "--opt" ]; then elif [ "$1" = "--opt" ]; then
shift 1 shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@" CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@"
elif [ "$1" = "--flat-opt" ]; then elif [ "$1" = "--flat-opt" ]; then
shift 1 shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450" "$@" CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450" "$@"
elif [ "$1" = "--safe-opt" ]; then elif [ "$1" = "--safe-opt" ]; then
shift 1 shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \ $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@" CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@"
elif [ "$1" = "--perf" ]; then elif [ "$1" = "--perf" ]; then
shift 1 shift 1
./configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g -pg" "$@" $HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g -pg" "$@"
elif [ "$1" = "--python" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" \
--enable-python "$@"
else
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" "$@"
fi fi
rm AUTHORS COPYING rm -f AUTHORS COPYING

View file

@ -19,7 +19,7 @@ AM_PATH_LISPDIR
# check if UNIX pipes are available # check if UNIX pipes are available
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if pipes can be used], [if pipes can be used],
[pipes_avail], [pipes_avail_cv_],
[AC_LANG_PUSH(C++) [AC_LANG_PUSH(C++)
AC_TRY_LINK( AC_TRY_LINK(
[#include <sys/types.h> [#include <sys/types.h>
@ -47,18 +47,18 @@ AC_CACHE_CHECK(
} else { } else {
close(pfd[0]); close(pfd[0]);
}], }],
[pipes_avail=true], [pipes_avail_cv_=true],
[pipes_avail=false]) [pipes_avail_cv_=false])
AC_LANG_POP]) AC_LANG_POP])
if [test x$pipes_avail = xtrue ]; then if [test x$pipes_avail_cv_ = xtrue ]; then
AC_DEFINE([HAVE_UNIX_PIPES], [1], [Whether UNIX pipes are available]) AC_DEFINE([HAVE_UNIX_PIPES], [1], [Whether UNIX pipes are available])
fi fi
# check for gmp # check for gmp
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if libgmp is available], [if libgmp is available],
[libgmp_avail], [libgmp_avail_cv_],
[libgmp_save_libs=$LIBS [libgmp_save_libs=$LIBS
LIBS="-lgmp $LIBS" LIBS="-lgmp $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
@ -67,12 +67,12 @@ AC_CACHE_CHECK(
[mpz_t bar; [mpz_t bar;
mpz_init(bar); mpz_init(bar);
mpz_clear(bar);], mpz_clear(bar);],
[libgmp_avail=true], [libgmp_avail_cv_=true],
[libgmp_avail=false]) [libgmp_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$libgmp_save_libs]) LIBS=$libgmp_save_libs])
if [test x$libgmp_avail = xtrue ]; then if [test x$libgmp_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_GMP, true) AM_CONDITIONAL(HAVE_GMP, true)
LIBS="-lgmp $LIBS" LIBS="-lgmp $LIBS"
else else
@ -82,19 +82,19 @@ fi
# check for pcre # check for pcre
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if libpcre is available], [if libpcre is available],
[libpcre_avail], [libpcre_avail_cv_],
[libpcre_save_libs=$LIBS [libpcre_save_libs=$LIBS
LIBS="-lpcre $LIBS" LIBS="-lpcre $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_TRY_LINK( AC_TRY_LINK(
[#include <pcre.h>], [#include <pcre.h>],
[pcre_free((pcre *)NULL);], [pcre_free((pcre *)NULL);],
[libpcre_avail=true], [libpcre_avail_cv_=true],
[libpcre_avail=false]) [libpcre_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$libpcre_save_libs]) LIBS=$libpcre_save_libs])
if [test x$libpcre_avail = xtrue ]; then if [test x$libpcre_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_PCRE, true) AM_CONDITIONAL(HAVE_PCRE, true)
LIBS="-lpcre $LIBS" LIBS="-lpcre $LIBS"
else else
@ -114,7 +114,7 @@ AM_CONDITIONAL(USE_XML, test x$xml = xtrue)
if [test x$xml = xtrue ]; then if [test x$xml = xtrue ]; then
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if libexpat is available], [if libexpat is available],
[libexpat_avail], [libexpat_avail_cv_],
[libexpat_save_libs=$LIBS [libexpat_save_libs=$LIBS
LIBS="-lexpat $LIBS" LIBS="-lexpat $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
@ -125,12 +125,12 @@ if [test x$xml = xtrue ]; then
}], }],
[XML_Parser parser = XML_ParserCreate(NULL); [XML_Parser parser = XML_ParserCreate(NULL);
return parser != NULL;], return parser != NULL;],
[libexpat_avail=true], [libexpat_avail_cv_=true],
[libexpat_avail=false]) [libexpat_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$libexpat_save_libs]) LIBS=$libexpat_save_libs])
if [test x$libexpat_avail = xtrue ]; then if [test x$libexpat_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_EXPAT, true) AM_CONDITIONAL(HAVE_EXPAT, true)
LIBS="-lexpat $LIBS" LIBS="-lexpat $LIBS"
else else
@ -141,10 +141,10 @@ else
fi fi
if [test x$xml = xtrue ]; then if [test x$xml = xtrue ]; then
if [test x$libexpat_avail = xfalse ]; then if [test x$libexpat_avail_cv_ = xfalse ]; then
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if libxmlparse is available], [if libxmlparse is available],
[libxmlparse_avail], [libxmlparse_avail_cv_],
[libxmlparse_save_libs=$LIBS [libxmlparse_save_libs=$LIBS
LIBS="-lxmlparse -lxmltok $LIBS" LIBS="-lxmlparse -lxmltok $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
@ -155,12 +155,12 @@ if [test x$xml = xtrue ]; then
}], }],
[XML_Parser parser = XML_ParserCreate(NULL); [XML_Parser parser = XML_ParserCreate(NULL);
return parser != NULL;], return parser != NULL;],
[libxmlparse_avail=true], [libxmlparse_avail_cv_=true],
[libxmlparse_avail=false]) [libxmlparse_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$libxmlparse_save_libs]) LIBS=$libxmlparse_save_libs])
if [test x$libxmlparse_avail = xtrue ]; then if [test x$libxmlparse_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_XMLPARSE, true) AM_CONDITIONAL(HAVE_XMLPARSE, true)
LIBS="-lxmlparse -lxmltok $LIBS" LIBS="-lxmlparse -lxmltok $LIBS"
else else
@ -186,19 +186,19 @@ AM_CONDITIONAL(USE_OFX, test x$ofx = xtrue)
if [test x$ofx = xtrue ]; then if [test x$ofx = xtrue ]; then
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if libofx is available], [if libofx is available],
[libofx_avail], [libofx_avail_cv_],
[libofx_save_libs=$LIBS [libofx_save_libs=$LIBS
LIBS="-lofx $LIBS" LIBS="-lofx $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_TRY_LINK( AC_TRY_LINK(
[#include <libofx.h>], [#include <libofx.h>],
[ LibofxContextPtr libofx_context = libofx_get_new_context();], [ LibofxContextPtr libofx_context = libofx_get_new_context();],
[libofx_avail=true], [libofx_avail_cv_=true],
[libofx_avail=false]) [libofx_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$libofx_save_libs]) LIBS=$libofx_save_libs])
if [test x$libofx_avail = xtrue ]; then if [test x$libofx_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_LIBOFX, true) AM_CONDITIONAL(HAVE_LIBOFX, true)
LIBS="-lofx $LIBS" LIBS="-lofx $LIBS"
else else
@ -223,7 +223,7 @@ if [test x$python = xtrue ]; then
if [test "$PYTHON" != :]; then if [test "$PYTHON" != :]; then
AC_CACHE_CHECK( AC_CACHE_CHECK(
[if boost_python is available], [if boost_python is available],
[boost_python_cpplib_avail], [boost_python_cpplib_avail_cv_],
[boost_python_save_libs=$LIBS [boost_python_save_libs=$LIBS
LIBS="-lboost_python -lpython$PYTHON_VERSION $LIBS" LIBS="-lboost_python -lpython$PYTHON_VERSION $LIBS"
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
@ -235,11 +235,11 @@ if [test x$python = xtrue ]; then
class_< foo > ("foo") ; class_< foo > ("foo") ;
}], }],
[return 0], [return 0],
[boost_python_cpplib_avail=true], [boost_python_cpplib_avail_cv_=true],
[boost_python_cpplib_avail=false]) [boost_python_cpplib_avail_cv_=false])
AC_LANG_POP AC_LANG_POP
LIBS=$boost_python_save_libs]) LIBS=$boost_python_save_libs])
if [test x$boost_python_cpplib_avail = xtrue ]; then if [test x$boost_python_cpplib_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_BOOST_PYTHON, true) AM_CONDITIONAL(HAVE_BOOST_PYTHON, true)
LIBS="-lboost_python -lpython$PYTHON_VERSION $LIBS" LIBS="-lboost_python -lpython$PYTHON_VERSION $LIBS"
else else