]> sigrok.org Git - libserialport.git/blobdiff - autogen.sh
Build: Use GNUMAKEFLAGS and $@
[libserialport.git] / autogen.sh
index 6d31db101a5bc1173a4264c65b2ae140d3772814..5e10887fdb2c2fd8cf7f9ba2b1c14f19d6620e97 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 ##
 ## This file is part of the libserialport project.
 ##
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ##
 
-OS=`uname`
-
-LIBTOOLIZE=libtoolize
-
-if [ "x$OS" = "xDarwin" ]; then
-       LIBTOOLIZE=glibtoolize
-       if [ -d /sw/share/aclocal ]; then
-               # fink installs aclocal macros here
-               ACLOCAL_DIR="-I /sw/share/aclocal"
-       elif [ -d /opt/local/share/aclocal ]; then
-               # Macports installs aclocal macros here
-               ACLOCAL_DIR="-I /opt/local/share/aclocal"
-       elif [ -d /usr/local/share/aclocal ]; then
-               # Homebrew installs aclocal macros here
-               ACLOCAL_DIR="-I /usr/local/share/aclocal"
-       elif [ -d /usr/share/aclocal ]; then
-               # Xcode installs aclocal macros here
-               ACLOCAL_DIR="-I /usr/share/aclocal"
-       fi
-fi
-
-echo "Generating build system..."
-${LIBTOOLIZE} --install --copy --quiet || exit 1
-aclocal ${ACLOCAL_DIR} || exit 1
-autoheader || exit 1
-automake --add-missing --copy || exit 1
-autoconf || exit 1
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
 
+test -d "$srcdir/autostuff" || mkdir "$srcdir/autostuff"
+autoreconf --force --install --verbose "$srcdir"