From 01e2e50f176d6e45f110716d118f5b519b7c3028 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 30 Nov 2018 14:01:06 -0500 Subject: [PATCH] Re-add --with-optim option to configure script. --- configure | 18 ++++++++++++++---- configure.ac | 9 ++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 74af040..bff4e33 100755 --- a/configure +++ b/configure @@ -656,8 +656,8 @@ ac_ct_CC CPPFLAGS CFLAGS CC -ARCHFLAGS OPTIM +ARCHFLAGS LDFLAGS VERSION host_os @@ -711,6 +711,7 @@ ac_user_opts=' enable_option_checking with_ansi with_archflags +with_optim enable_debug with_docdir with_vsnprintf @@ -1351,6 +1352,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-ansi set full ANSI C mode, default=no --with-archflags set additional architecture flags, default=none + --with-optim set additional optimization flags, default=none --with-docdir set directory for documentation, default=${prefix}/share/doc/mxml --with-vsnprintf use vsnprintf emulation functions, default=auto @@ -2309,8 +2311,6 @@ CFLAGS="${CFLAGS:=}" CXXFLAGS="${CXXFLAGS:=}" LDFLAGS="${LDFLAGS:=}" -OPTIM="" - # Check whether --with-ansi was given. @@ -2331,10 +2331,20 @@ fi + +# Check whether --with-optim was given. +if test "${with_optim+set}" = set; then : + withval=$with_optim; OPTIM="$withval" +else + OPTIM="" +fi + + + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then - OPTIM="-g" + OPTIM="$OPTIM -g" fi fi diff --git a/configure.ac b/configure.ac index 88d467e..e71d4cf 100644 --- a/configure.ac +++ b/configure.ac @@ -41,8 +41,6 @@ CFLAGS="${CFLAGS:=}" CXXFLAGS="${CXXFLAGS:=}" LDFLAGS="${LDFLAGS:=}" AC_SUBST(LDFLAGS) -OPTIM="" -AC_SUBST(OPTIM) AC_ARG_WITH(ansi, [ --with-ansi set full ANSI C mode, default=no], use_ansi="$withval", @@ -53,9 +51,14 @@ AC_ARG_WITH(archflags, [ --with-archflags set additional architecture fl ARCHFLAGS="") AC_SUBST(ARCHFLAGS) +AC_ARG_WITH(optim, [ --with-optim set additional optimization flags, default=none], + OPTIM="$withval", + OPTIM="") +AC_SUBST(OPTIM) + AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no], if eval "test x$enable_debug = xyes"; then - OPTIM="-g" + OPTIM="$OPTIM -g" fi) AC_ARG_WITH(docdir, [ --with-docdir set directory for documentation, default=${prefix}/share/doc/mxml],