From 33ee059c671b5cccab2bfcf02dd2cd028e7536e2 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 31 Oct 2011 14:29:46 +0100 Subject: [PATCH] Make --with-elfutils work with either a source release or git checkout. Add configure check to see if this is a source release, or a source checkout. We need --enable-maintainer-mode if it isn't a source release to make sure some additional files are generated. This makes working against non-released elfutils git checkout a lot easier. --- configure | 9 +++++++++ configure.ac | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/configure b/configure index bf527733c..1d465659a 100755 --- a/configure +++ b/configure @@ -10429,12 +10429,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # So we must make sure to pass those settings to elfutils configure. elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}" here=`pwd` + # Check whether this is a source release, or a source checkout. + # We need --enable-maintainer-mode if it isn't a source release. + # elfutils.spec is only distributed in source releases. + if test -f ${elfutils_srcdir}/elfutils.spec; then + need_maintainer_option="" + else + need_maintainer_option="--enable-maintainer-mode" + fi (mkdir -p build-elfutils && cd build-elfutils && bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \ --includedir="${here}/include-elfutils" \ --libdir="${here}/lib-elfutils" \ --exec-prefix="$exec_prefix" \ --prefix="$prefix" \ + ${need_maintainer_option} \ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then diff --git a/configure.ac b/configure.ac index c8b90de2b..590c4e518 100644 --- a/configure.ac +++ b/configure.ac @@ -535,12 +535,21 @@ if test $build_elfutils = yes -a $enable_translator = yes; then # So we must make sure to pass those settings to elfutils configure. elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}" here=`pwd` + # Check whether this is a source release, or a source checkout. + # We need --enable-maintainer-mode if it isn't a source release. + # elfutils.spec is only distributed in source releases. + if test -f ${elfutils_srcdir}/elfutils.spec; then + need_maintainer_option="" + else + need_maintainer_option="--enable-maintainer-mode" + fi (mkdir -p build-elfutils && cd build-elfutils && bash ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \ --includedir="${here}/include-elfutils" \ --libdir="${here}/lib-elfutils" \ --exec-prefix="$exec_prefix" \ --prefix="$prefix" \ + ${need_maintainer_option} \ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then -- 2.43.5