summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevzero2000 <devzero2000>2013-07-04 15:25:33 +0000
committerdevzero2000 <devzero2000>2013-07-04 15:25:33 +0000
commit9fb532e26695282490a9dd808d57f7aa27770d04 (patch)
treec7d8234837308f6675dfe67da79f66f9eadaeeaf
parent66960e3a01ef723e8020b88309c96e2411bd663c (diff)
downloadlibpopt-9fb532e26695282490a9dd808d57f7aa27770d04.tar.gz
Print to the end of the configure phase the options we have
enabled and their results on the basis of the target system. Fix also some trivial quoting in configure.ac
-rw-r--r--CHANGES2
-rw-r--r--acinclude.m413
-rwxr-xr-xconfigure.ac38
3 files changed, 42 insertions, 11 deletions
diff --git a/CHANGES b/CHANGES
index 7f72fc1..d30682c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,6 @@
1.17 -> 2.0:
+ - devzero2000: Print to the end of the configure phase the options we have
+ enabled and their results on the basis of the target system
- devzero2000: fail autogen.sh if autoreconf fail
- devzero2000: refine the --enable-valgrind autoconf check
we are now analyzing with valgrind only the test suite
diff --git a/acinclude.m4 b/acinclude.m4
index f8cd8bb..17fdf96 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -56,3 +56,16 @@ AS_VAR_POPDEF([popt_ldflags])dnl
AS_VAR_POPDEF([popt_my_ldflags])dnl
m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
])
+
+# popt_MSG_STATUS([featurename],[have_feature], [enable_feature])
+# --------------------------------------------------------------
+AC_DEFUN([popt_MSG_STATUS],
+[
+ m4_if($#,3,,[m4_fatal([$0: invalid number of arguments: $#])])
+ AS_ECHO_N([" $1: "])
+ AS_IF([test "x$3" = "xno"], [AS_ECHO(["$2 (disabled)"])],
+ [test "x$3" = "xyes"], [AS_ECHO(["$2"])],
+ [test "x$3" = "x"], [AS_ECHO(["$2"])],
+ [AS_ECHO(["$2 ($3)"])])
+])
+
diff --git a/configure.ac b/configure.ac
index 921e7ba..42502b9 100755
--- a/configure.ac
+++ b/configure.ac
@@ -167,7 +167,9 @@ AS_IF([ test x"$popt_gcc_mudflap" = x"yes" ],
AC_SUBST([MUDFLAP_OPTIONS])
])
],
- [ AC_MSG_WARN([--enable-mudflap requires GCC])]
+ [ popt_gcc_mudflap=no
+ AC_MSG_WARN([--enable-mudflap requires GCC])
+ ]
)
])
@@ -189,7 +191,8 @@ AS_IF([test "x$popt_gcc_pie" = xyes],
[ popt_CFLAGS_ADD([-fpie], [POPT_CFLAGS])
popt_LDFLAGS_ADD([-pie], [POPT_LDFLAGS])
],
- [ AC_MSG_WARN([--enable-build-pie requires GCC])]
+ [ popt_gcc_pie=no
+ AC_MSG_WARN([--enable-build-pie requires GCC])]
)
])
AC_SUBST([POPT_LDFLAGS])
@@ -212,13 +215,14 @@ AC_SUBST([POPT_CFLAGS])
# Support for running test cases using valgrind:
-use_valgrind=false
+use_valgrind=no
+HAVE_VALGRIND=no
VALGRIND_ENVIRONMENT=""
-AC_ARG_ENABLE(valgrind,
+AC_ARG_ENABLE([valgrind],
[ --enable-valgrind Use valgrind when running unit tests. ],
-[ use_valgrind=true ])
+[ use_valgrind=yes ])
-AS_IF([ test x"$use_valgrind" = x"true" ],
+AS_IF([ test x"$use_valgrind" = x"yes" ],
[
AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
AS_IF([ test x$HAVE_VALGRIND = no ],
@@ -238,7 +242,7 @@ AS_IF([ test x"$use_valgrind" = x"true" ],
# Checks for doxygen support.
AC_PATH_PROG(DOXYGEN, doxygen, NO_DOXYGEN)
-AC_ARG_ENABLE(doxygen,
+AC_ARG_ENABLE([doxygen],
AS_HELP_STRING([--disable-doxygen],[disable doxygen API docs generation ]),
[DOXYGEN_ENABLE=$enableval,
if test x$DOXYGEN_ENABLE != xno
@@ -257,8 +261,8 @@ AM_CONDITIONAL([DOXYGEN_ENABLE], [test x$DOXYGEN != xNO_DOXYGEN])
# Check for gcov support.
# Check for lcov Makefile conditional
-AC_PATH_PROG(LCOV,lcov, NO_LCOV)
-AC_ARG_ENABLE(build-gcov,
+AC_PATH_PROG(LCOV,lcov, no)
+AC_ARG_ENABLE([build-gcov],
AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov @<:@default=no@:>@.]),
[enable_build_gcov=${enableval}],
[enable_build_gcov=no])
@@ -270,10 +274,10 @@ AS_IF([test "x$enable_build_gcov" != xno],
popt_CFLAGS_ADD([-fprofile-arcs -ftest-coverage], [POPT_CFLAGS])
AC_SUBST([POPT_CFLAGS])
else
- LCOV=NO_LCOV
+ LCOV=no
fi
])
-AM_CONDITIONAL([HAVE_LCOV], [test x$LCOV != xNO_LCOV])
+AM_CONDITIONAL([HAVE_LCOV], [test x$LCOV != xno])
# Check for api-sanity-autotest.pl Makefile conditional support for check-local
AC_PATH_PROG(API_SANITY_AUTOTEST,api-sanity-autotest.pl,NO_API_SANITY_AUTOTEST)
@@ -399,3 +403,15 @@ AC_SUBST([POPT_PKGCONFIG_LIBS],"$popt_pkgconfig_libs")
AC_CONFIG_FILES([Makefile Doxyfile popt.pc popt.spec po/Makefile.in
auto/Makefile auto/desc ])
AC_OUTPUT
+
+# Print a summary of what features we enabled and have
+AC_MSG_NOTICE([Summary of detected features follows])
+
+popt_MSG_STATUS([gcc-warnings],[$popt_gcc_warnings],[$popt_gcc_warnings])
+popt_MSG_STATUS([mudflap],[$popt_gcc_mudflap],[$popt_gcc_mudflap])
+popt_MSG_STATUS([build-pie],[$popt_gcc_pie],[$popt_gcc_pie])
+popt_MSG_STATUS([valgrind],[$HAVE_VALGRIND],[$use_valgrind])
+popt_MSG_STATUS([doxygen],[$DOXYGEN_ENABLE],[$DOXYGEN_ENABLE])
+popt_MSG_STATUS([build-gcov],[$LCOV], [$enable_build_gcov])
+popt_MSG_STATUS([ld-version-script],[LD_VERSION_SCRIPT_FLAG=$LD_VERSION_SCRIPT_FLAG],[$have_ld_version_script])
+