build: work with older autotools
authorMarko Kreen <markokr@gmail.com>
Tue, 20 Dec 2011 19:04:23 +0000 (21:04 +0200)
committerMarko Kreen <markokr@gmail.com>
Tue, 20 Dec 2011 19:05:39 +0000 (21:05 +0200)
- AC_PROG_SED|MKDIR_P can be missing
- Avoid nosub_top_builddir being empty
- aclocal wants space after -I

m4/usual.m4
mk/antimake.mk
mk/std-autogen.sh

index fc62a170e477e28b4481e6336d134431b1e6693a..664187e75044afcdf4b7eab506078d795f1bb9bf 100644 (file)
@@ -131,12 +131,24 @@ fi
 AC_SUBST(WFLAGS)
 
 AC_PROG_INSTALL
-AC_PROG_MKDIR_P
 AC_PROG_LN_S
-AC_PROG_SED
 AC_PROG_EGREP
 AC_PROG_AWK
 
+dnl AC_PROG_MKDIR_P and AC_PROG_SED are from newer autotools
+m4_ifdef([AC_PROG_MKDIR_P], [
+  AC_PROG_MKDIR_P
+], [
+  MKDIR_P="mkdir -p"
+  AC_SUBST(MKDIR_P)
+])
+m4_ifdef([AC_PROG_SED], [
+  AC_PROG_SED
+], [
+  SED="sed"
+  AC_SUBST(SED)
+])
+
 AC_CHECK_TOOL([STRIP], [strip])
 AC_CHECK_TOOL([RANLIB], [ranlib], [true])
 AC_CHECK_TOOL([AR], [ar])
index c791064c182b984a5a493029a5252a9c180e55ef..d32aae1053b2dcccd43613e2c683902cb71fdd13 100755 (executable)
@@ -233,8 +233,14 @@ pkgconfigdir ?= ${libdir}/pkgconfig
 # autoconf values for top dir
 abs_top_srcdir ?= $(CURDIR)
 abs_top_builddir ?= $(CURDIR)
-nosub_top_builddir ?= .
-nosub_top_srcdir ?= .
+
+# make sure nosub vals are not empty
+ifeq ($(nosub_top_builddir),)
+nosub_top_builddir = .
+endif
+ifeq ($(nosub_top_srcdir),)
+nosub_top_srcdir = .
+endif
 
 ##
 ## Variables for user makefiles
index a7bf045bae602cd5723a32ecdee38e064a950b14..3128a22347b67f9895d415f882e98618065ca242 100755 (executable)
@@ -28,7 +28,7 @@ fi
 grep -qE 'LT_INIT|LIBTOOL' configure.ac || rm -f ltmain.sh
 
 # Now generate configure & config.h
-aclocal -I${USUAL_DIR}/m4
+aclocal -I ${USUAL_DIR}/m4
 autoheader
 autoconf