From b0d8d5cc187ed278473f74d625c8b373fc1d2393 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Tue, 20 Dec 2011 21:04:23 +0200 Subject: [PATCH] build: work with older autotools - AC_PROG_SED|MKDIR_P can be missing - Avoid nosub_top_builddir being empty - aclocal wants space after -I --- m4/usual.m4 | 16 ++++++++++++++-- mk/antimake.mk | 10 ++++++++-- mk/std-autogen.sh | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/m4/usual.m4 b/m4/usual.m4 index fc62a17..664187e 100644 --- a/m4/usual.m4 +++ b/m4/usual.m4 @@ -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]) diff --git a/mk/antimake.mk b/mk/antimake.mk index c791064..d32aae1 100755 --- a/mk/antimake.mk +++ b/mk/antimake.mk @@ -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 diff --git a/mk/std-autogen.sh b/mk/std-autogen.sh index a7bf045..3128a22 100755 --- a/mk/std-autogen.sh +++ b/mk/std-autogen.sh @@ -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 -- 2.39.5