summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-05-02 10:27:18 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-05-02 10:27:18 +0000
commit4b9dcf13062cca86e30b199b45e2d98256b103a3 (patch)
tree89d9e97297973abad6ca85fb3dec01a1d568dc8d
parentbe4e5a1d64512d389d3a1663a60e063d0e7d3d22 (diff)
downloadpcre-4b9dcf13062cca86e30b199b45e2d98256b103a3.tar.gz
Add code to configure.ac to remove -g from default CFLAGS and CXXFLAGS.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@159 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog8
-rw-r--r--NEWS12
-rwxr-xr-xRunGrepTest4
-rwxr-xr-xRunTest6
-rw-r--r--configure.ac44
5 files changed, 57 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index cd01b68..a98c048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,10 +6,12 @@ Version 7.2 01-May-07
1. If the fr_FR locale cannot be found for test 3, try the "french" locale,
which is apparently normally available under Windows.
-
+
2. Re-jig the pcregrep tests with different newline settings in an attempt
- to make them independent of the local environment's newline setting.
-
+ to make them independent of the local environment's newline setting.
+
+ 3. Add code to configure.ac to remove -g from the CFLAGS default settings.
+
Version 7.1 24-Apr-07
---------------------
diff --git a/NEWS b/NEWS
index 0fd5a90..f0fad3e 100644
--- a/NEWS
+++ b/NEWS
@@ -5,12 +5,12 @@ News about PCRE releases
Release 7.2 30-Apr-07
---------------------
-Correction to the notes for 7.1: the note about shared libraries for Windows is
-wrong. Previously, three libraries were built, but each could function
-independently. For example, the pcreposix library also included all the
-functions from the basic pcre library. The change is that the three libraries
-are no longer independent. They are like the Unix libraries. To use the
-pcreposix functions, for example, you need to link with both the pcreposix and
+Correction to the notes for 7.1: the note about shared libraries for Windows is
+wrong. Previously, three libraries were built, but each could function
+independently. For example, the pcreposix library also included all the
+functions from the basic pcre library. The change is that the three libraries
+are no longer independent. They are like the Unix libraries. To use the
+pcreposix functions, for example, you need to link with both the pcreposix and
the basic pcre library.
diff --git a/RunGrepTest b/RunGrepTest
index 961430a..7fe5295 100755
--- a/RunGrepTest
+++ b/RunGrepTest
@@ -228,8 +228,8 @@ fi
# We go to some contortions to try to ensure that the tests for the various
-# newline settings will work in environments where the normal newline sequence
-# is not \n. Note the messy fudge to get printf to write a string that starts
+# newline settings will work in environments where the normal newline sequence
+# is not \n. Note the messy fudge to get printf to write a string that starts
# with a hyphen.
echo "Testing pcregrep newline settings"
diff --git a/RunTest b/RunTest
index 53ecffe..2d2162f 100755
--- a/RunTest
+++ b/RunTest
@@ -174,11 +174,11 @@ if [ $do3 = yes ] ; then
sed 's/fr_FR/french/' $testdata/testinput3 >test3input
sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
infile=test3input
- outfile=test3output
+ outfile=test3output
else
- locale=
+ locale=
fi
- fi
+ fi
if [ "$locale" != "" ] ; then
echo "Test 3: locale-specific features (using '$locale' locale)"
diff --git a/configure.ac b/configure.ac
index 291fc28..4ca8324 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,9 +7,9 @@ dnl be defined as -RC2, for example. For real releases, it should be defined
dnl empty.
m4_define(pcre_major, [7])
-m4_define(pcre_minor, [1])
-m4_define(pcre_prerelease, [])
-m4_define(pcre_date, [2007-04-24])
+m4_define(pcre_minor, [2])
+m4_define(pcre_prerelease, [-RC1])
+m4_define(pcre_date, [2007-05-02])
# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre_version, [0:1:0])
@@ -21,8 +21,46 @@ AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre)
AC_CONFIG_SRCDIR([pcre.h.in])
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
AC_CONFIG_HEADERS(config.h)
+
+# The default CFLAGS and CXXFLAGS in Autoconf are "-g -O2" for gcc and just
+# "-g" for any other compiler. There doesn't seem to be a standard way of
+# getting rid of the -g (which I don't think is needed for a production
+# library). This fudge seems to achieve the necessary. First, we remember the
+# externally set values of CFLAGS and CXXFLAGS. Then call the AC_PROG_CC and
+# AC_PROG_CXX macros to find the compilers - if CFLAGS and CXXFLAGS are not
+# set, they will be set to Autoconf's defaults. Afterwards, if the original
+# values were not set, remove the -g from the Autoconf defaults.
+# (PH 02-May-07)
+
+remember_set_CFLAGS="$CFLAGS"
+remember_set_CXXFLAGS="$CXXFLAGS"
+
AC_PROG_CC
AC_PROG_CXX
+
+if test "x$remember_set_CFLAGS" = "x"
+then
+ if test "$CFLAGS" = "-g -O2"
+ then
+ CFLAGS="-O2"
+ elif test "$CFLAGS" = "-g"
+ then
+ CFLAGS=""
+ fi
+fi
+
+if test "x$remember_set_CXXFLAGS" = "x"
+then
+ if test "$CXXFLAGS" = "-g -O2"
+ then
+ CXXFLAGS="-O2"
+ elif test "$CXXFLAGS" = "-g"
+ then
+ CXXFLAGS=""
+ fi
+fi
+
+
AC_PROG_INSTALL
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL