]> granicus.if.org Git - apache/blobdiff - buildconf
change so that it doesn't rely on the structure of the apr_table's elt internal
[apache] / buildconf
index 123c717a22b4df1af6da50e4c81664f905fe35c5..6afff4800706f56925df00d23dc7c8a7560e519e 100755 (executable)
--- a/buildconf
+++ b/buildconf
 #!/bin/sh
-
-# TODO - Steal the new PHP buildconf and build.mk.
-# This will do for now, though
-
-supplied_flag=$1
-
-# do some version checking for the tools we use
-if test "$1" = "--force"; then
-    shift
-# this is a posix correct "test -nt"
-elif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
-    :
-else
-    echo "buildconf: checking installation..."
-
-    # autoconf will check for the version itself
-    # automake 1.4 or newer
-    am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
-    if test "$am_version" = ""; then
-       echo "buildconf: automake not found."
-       echo "           You need automake version 1.4 or newer installed"
-       echo "           to build APACHE from CVS."
-       exit 1
-    fi
-    IFS=.; set $am_version; IFS=' '
-    if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
-       echo "buildconf: automake version $am_version found."
-       echo "           You need automake version 1.4 or newer installed"
-       echo "           to build APACHE from CVS."
-       exit 1
-    else
-       echo "buildconf: automake version $am_version (ok)"
-    fi
-
-    # libtool 1.3.3 or newer
-    lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
-    if test "$lt_pversion" = ""; then
-       echo "buildconf: libtool not found."
-       echo "           You need libtool version 1.3 or newer installed"
-       echo "           to build APACHE from CVS."
-       exit 1
-    fi
-    lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
-    IFS=.; set $lt_version; IFS=' '
-    if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
-    then
-       echo "buildconf: libtool version $lt_pversion (ok)"
-    else
-       echo "buildconf: libtool version $lt_pversion found."
-       echo "           You need libtool version 1.3.3 or newer installed"
-       echo "           to build APACHE from CVS."
-       exit 1
-    fi
-    touch buildconf.stamp
-fi
-
-am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
-lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
-if test "$am_prefix" != "$lt_prefix"; then
-    echo "buildconf: WARNING: automake and libtool are installed in different"
-    echo "           directories.  This may cause aclocal to fail."
-    echo "buildconf: continuing anyway"
-fi
-
-if test "$supplied_flag" = "--copy"; then
-    automake_flags=--copy
-fi
-
-./helpers/build-acconfig-header
-
-mv aclocal.m4 aclocal.m4.old 2>/dev/null
-aclocal
-if test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
-    echo "buildconf: ERROR: aclocal failed, probably because automake and"
-    echo "           libtool are installed with different prefixes;"
-    echo "           automake is installed in $am_prefix, but libtool in $lt_prefix."
-    echo "           Please re-install automake and/or libtool with a common prefix"
-    echo "           and try again."
+# ====================================================================
+# The Apache Software License, Version 1.1
+#
+# Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
+# reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by the
+#        Apache Software Foundation (http://www.apache.org/)."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. The names "Apache" and "Apache Software Foundation" must
+#    not be used to endorse or promote products derived from this
+#    software without prior written permission. For written
+#    permission, please contact apache@apache.org.
+#
+# 5. Products derived from this software may not be called "Apache",
+#    nor may "Apache" appear in their name, without prior written
+#    permission of the Apache Software Foundation.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# ====================================================================
+#
+# This software consists of voluntary contributions made by many
+# individuals on behalf of the Apache Software Foundation.  For more
+# information on the Apache Software Foundation, please see
+# <http://www.apache.org/>.
+#
+
+# buildconf: Build the support scripts needed to compile from a
+#            checked-out version of the source code.
+
+#
+# Check to be sure that we have the srclib dependencies checked-out
+#
+if [ ! -d srclib/apr -o ! -f srclib/apr/build/apr_common.m4 ]; then
+    echo ""
+    echo "You don't have a srclib/apr/ subdirectory.  Please get one:"
+    echo ""
+    echo "   cd srclib"
+    echo "   cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
+    echo "      (password 'anoncvs')"
+    echo "   cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
+    echo ""
     exit 1
 fi
-
-if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
-    echo "buildconf: keeping aclocal.m4"
-    mv aclocal.m4.old aclocal.m4
-else
-    echo "buildconf: created or modified aclocal.m4"
+if [ ! -d srclib/apr-util -o ! -f srclib/apr-util/Makefile.in ]; then
+    echo ""
+    echo "You don't have a srclib/apr-util/ subdirectory.  Please get one:"
+    echo ""
+    echo "   cd srclib"
+    echo "   cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
+    echo "      (password 'anoncvs')"
+    echo "   cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util"
+    echo ""
+    exit 1
 fi
 
-autoheader
+# These are temporary until Roy finishes the other build changes
+#
+touch .deps
+rm -f aclocal.m4
+rm -f generated_lists
+
+case "`uname`" in
+*BSD/OS*)
+    ./build/bsd_makefile;;
+esac
+#
+# end temporary stuff
+
+apr_configure="srclib/apr/configure"
+aprutil_configure="srclib/apr-util/configure"
+pcre_configure="srclib/pcre/configure"
+config_h_in="include/ap_config_auto.h.in"
+
+cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
+
+echo rebuilding $apr_configure
+(cd srclib/apr && ./buildconf) || {
+    echo "./buildconf failed for apr"
+    exit 1
+}
 
-# find all Makefile.ams
-files="Makefile `find ap lib main modules regex os -name Makefile.am | sed 's#\.am##' | tr '\n' ' '`"
+echo rebuilding $aprutil_configure
+(cd srclib/apr-util && ./buildconf) || {
+    echo "./buildconf failed for apr-util" 
+    exit 1
+}
 
-# suppress stupid automake warning
-automake --add-missing --include-deps $automake_flags $files 2>&1 | grep -v \$APACHE_OUTPUT_FILES >&2
+echo rebuilding $pcre_configure
+(cd srclib/pcre && autoconf)
 
+echo rebuilding $config_h_in
+rm -f $config_h_in
+autoheader 2>&1 | grep -v "$cross_compile_warning"
 
-mv configure configure.old 2>/dev/null
-autoconf
-if cmp configure.old configure > /dev/null 2>&1; then
-    echo "buildconf: keeping configure"
-    mv configure.old configure
-else
-    echo "buildconf: created or modified configure"
-fi
+echo rebuilding configure
+rm -f config.cache
+autoconf 2>&1 | grep -v "$cross_compile_warning"
 
+exit 0