summary refs log tree commit diff stats
path: root/configure.ac
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-08-02 23:25:40 -0700
committerTingPing <tngpng@gmail.com>2013-08-02 23:25:40 -0700
commitbdc814a4a410610d8aee2211b13a3a86fe477dd3 (patch)
treec32299c394006fdbb0351c729d95b450d6783ada /configure.ac
parentce40e5a11187cbd0152d744e9960ea91ec3a8de0 (diff)
parent19d435648443bc0dc7a1a4058de1eeb79730d809 (diff)
Merge pull request #677 from hasufell/master
CONFIGURE: add "--enable-minimal-flags"
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e94f6924..009ae66a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,11 @@ AC_ARG_ENABLE(libproxy,
 	[AS_HELP_STRING([--disable-libproxy],[disable libproxy support (default: auto)])],
         libproxy=$enableval, libproxy=auto)
 
+AC_ARG_ENABLE(minimal-flags,
+	[AS_HELP_STRING([--enable-minimal-flags],[only add those CFLAGS that are really needed or not intrusive (default: no)])],
+        minimalflags=$enableval, minimalflags=no)
+
+
 
 dnl *********************************************************************
 dnl ** GLIB *************************************************************
@@ -783,13 +788,16 @@ if test "x$GCC" = "xyes"; then
 	if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
 		CFLAGS="$CFLAGS -Wall"
 	fi
-	if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
-		if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
-			CFLAGS="$CFLAGS -pipe"
+	dnl these flags might be unwanted
+	if test x$minimalflags != xyes; then
+		if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
+			if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
+				CFLAGS="$CFLAGS -pipe"
+			fi
+		fi
+		if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
+			CFLAGS="$CFLAGS -g"
 		fi
-	fi
-	if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
-		CFLAGS="$CFLAGS -g"
 	fi
 fi