]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - autogen.sh
all_errnos/all_syscalls: use sed to extract defines from headers
[thirdparty/util-linux.git] / autogen.sh
index 4d03c3b4226dce04bf722a6f559a743daa847b41..833f90415f5c51c3351d7c196b1fd1ae082ae82d 100755 (executable)
@@ -73,6 +73,9 @@ test -f sys-utils/mount.c ||
 [ -x "$(command -v gettext)" -o -x "$(command -v xgettext)" ] ||
        warn_mesg "You need have [x]gettext binary installed to update po/ stuff."
 
+(flex --version) < /dev/null > /dev/null 2>&1 ||
+       error_mesg "You must have flex installed to build the util-linux."
+
 if ! (bison --version) < /dev/null > /dev/null 2>&1; then
        error_mesg "You must have bison installed to build the util-linux."
 else
@@ -86,6 +89,7 @@ else
        esac
 fi
 
+
 LIBTOOLIZE=libtoolize
 case `uname` in Darwin*) LIBTOOLIZE=glibtoolize ;; esac
 if ! ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then
@@ -112,6 +116,7 @@ echo "   autoconf:   $(autoconf --version | head -1)"
 echo "   autoheader: $(autoheader --version | head -1)"
 echo "   automake:   $(automake --version | head -1)"
 echo "   libtoolize: $($LIBTOOLIZE --version | head -1)"
+echo "   flex:       $(flex --version | head -1)"
 echo "   bison:      $(bison --version | head -1)"
 echo
 
@@ -126,12 +131,29 @@ if ! grep -q datarootdir po/Makefile.in.in; then
 datadir = @datadir@/g' po/Makefile.in.in
 fi
 $LIBTOOLIZE --force $LT_OPTS
+
+# patch libtool
+if test -f tools/libtool.m4.patch; then
+       if test -L m4/libtool.m4; then
+               cp m4/libtool.m4 m4/libtool.m4.org
+               rm m4/libtool.m4
+               mv m4/libtool.m4.org m4/libtool.m4
+       fi
+       set +e
+       patch --batch --dry -p1 < tools/libtool.m4.patch > /dev/null 2>&1
+       if [ "$?" -eq 0 ]; then
+               patch -p1 --batch < tools/libtool.m4.patch
+       fi
+       set -e
+fi
+
 aclocal -I m4 $AL_OPTS
 autoconf $AC_OPTS
 autoheader $AH_OPTS
 
 automake --add-missing $AM_OPTS
 
+
 cd "$THEDIR"
 
 echo