Allow setting PCRE_{CFLAGS,LIBS} when building SWIG with PCRE.
These options can be used to override the values returned by pcre-config, e.g. to build using a static PCRE library even if pcre-config prefers to use the shared one by default. Use the updated AX_PATH_GENERIC macro from autoconf archive which was fixed to allow the options set by the user to override the ones returned by pcre-config (in fact, pcre-config isn't even called at all if these options are set). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12548 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c339c0b4f7
commit
ae6aef5d8f
3 changed files with 88 additions and 58 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 2.0.3 (in progress)
|
Version 2.0.3 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2011-03-21: vadz
|
||||||
|
[build] Allow setting PCRE_CFLAGS and PCRE_LIBS to override the values returned by
|
||||||
|
pcre-config, e.g. to allow using a static version of PCRE library.
|
||||||
|
|
||||||
2011-03-17: wsfulton
|
2011-03-17: wsfulton
|
||||||
[UTL] Add missing headers in generated STL wrappers to fix compilation with gcc-4.6.
|
[UTL] Add missing headers in generated STL wrappers to fix compilation with gcc-4.6.
|
||||||
|
|
||||||
|
|
|
||||||
8
README
8
README
|
|
@ -57,8 +57,12 @@ You must use GNU `make' to build SWIG.
|
||||||
|
|
||||||
http://www.gnu.org/software/make/
|
http://www.gnu.org/software/make/
|
||||||
|
|
||||||
PCRE needs to be installed on your system to build SWIG. The configure
|
PCRE needs to be installed on your system to build SWIG, in particular
|
||||||
script will provide instructions for obtaining PCRE if it cannot be found.
|
pcre-config must be available. If you have PCRE headers and libraries but not
|
||||||
|
pcre-config itself or, alternatively, wish to override the compiler or linker
|
||||||
|
flags returned by pcre-config, you may set PCRE_LIBS and PCRE_CFLAGS variables
|
||||||
|
to be used instead. And if you don't have PCRE at all, the configure script
|
||||||
|
will provide instructions for obtaining it.
|
||||||
|
|
||||||
To build and install SWIG, simply type the following:
|
To build and install SWIG, simply type the following:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
#
|
#
|
||||||
# Runs the LIBRARY-config script and defines LIBRARY_CFLAGS and
|
# Runs the LIBRARY-config script and defines LIBRARY_CFLAGS and
|
||||||
# LIBRARY_LIBS
|
# LIBRARY_LIBS unless the user had predefined them in the environment.
|
||||||
#
|
#
|
||||||
# The script must support `--cflags' and `--libs' args. If MINIMUM-VERSION
|
# The script must support `--cflags' and `--libs' args. If MINIMUM-VERSION
|
||||||
# is specified, the script must also support the `--version' arg. If the
|
# is specified, the script must also support the `--version' arg. If the
|
||||||
|
|
@ -22,6 +22,12 @@
|
||||||
# to extract the version number. Use it if your 'foo-config --version'
|
# to extract the version number. Use it if your 'foo-config --version'
|
||||||
# dumps something like 'Foo library v1.0.0 (alfa)' instead of '1.0.0'.
|
# dumps something like 'Foo library v1.0.0 (alfa)' instead of '1.0.0'.
|
||||||
#
|
#
|
||||||
|
# The macro respects LIBRARY_CONFIG, LIBRARY_CFLAGS and LIBRARY_LIBS
|
||||||
|
# variables. If the first one is defined, it specifies the name of the
|
||||||
|
# config script to use. If the latter two are defined, the script is not
|
||||||
|
# ran at all and their values are used instead (if only one of them is
|
||||||
|
# defined, the empty value of the remaining one is still used).
|
||||||
|
#
|
||||||
# Example:
|
# Example:
|
||||||
#
|
#
|
||||||
# AX_PATH_GENERIC(Foo, 1.0.0)
|
# AX_PATH_GENERIC(Foo, 1.0.0)
|
||||||
|
|
@ -44,6 +50,14 @@
|
||||||
# BAR_CFLAGS to `bar-config --cflags`
|
# BAR_CFLAGS to `bar-config --cflags`
|
||||||
# BAR_LIBS to `bar-config --libs`
|
# BAR_LIBS to `bar-config --libs`
|
||||||
#
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# ./configure BAZ_LIBS=/usr/lib/libbaz.a
|
||||||
|
#
|
||||||
|
# would link with a static version of baz library even if `baz-config
|
||||||
|
# --libs` returns just "-lbaz" that would normally result in using the
|
||||||
|
# shared library.
|
||||||
|
#
|
||||||
# This macro is a rearranged version of AC_PATH_GENERIC from Angus Lees.
|
# This macro is a rearranged version of AC_PATH_GENERIC from Angus Lees.
|
||||||
#
|
#
|
||||||
# LICENSE
|
# LICENSE
|
||||||
|
|
@ -55,7 +69,7 @@
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# warranty.
|
# warranty.
|
||||||
|
|
||||||
#serial 10
|
#serial 11
|
||||||
|
|
||||||
AU_ALIAS([AC_PATH_GENERIC], [AX_PATH_GENERIC])
|
AU_ALIAS([AC_PATH_GENERIC], [AX_PATH_GENERIC])
|
||||||
AC_DEFUN([AX_PATH_GENERIC],[
|
AC_DEFUN([AX_PATH_GENERIC],[
|
||||||
|
|
@ -75,6 +89,13 @@ AC_DEFUN([AX_PATH_GENERIC],[
|
||||||
AC_ARG_VAR(UP[]_CFLAGS, [CFLAGS used for $1])
|
AC_ARG_VAR(UP[]_CFLAGS, [CFLAGS used for $1])
|
||||||
AC_ARG_VAR(UP[]_LIBS, [LIBS used for $1])
|
AC_ARG_VAR(UP[]_LIBS, [LIBS used for $1])
|
||||||
|
|
||||||
|
AS_IF([test x$UP[]_CFLAGS != x -o x$UP[]_LIBS != x],[
|
||||||
|
dnl Don't run config script at all, use user-provided values instead.
|
||||||
|
AC_SUBST(UP[]_CFLAGS)
|
||||||
|
AC_SUBST(UP[]_LIBS)
|
||||||
|
:
|
||||||
|
$4
|
||||||
|
],[
|
||||||
AS_IF([test x$DOWN[]_config_exec_prefix != x],[
|
AS_IF([test x$DOWN[]_config_exec_prefix != x],[
|
||||||
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
|
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
|
||||||
AS_IF([test x${UP[]_CONFIG+set} != xset],[
|
AS_IF([test x${UP[]_CONFIG+set} != xset],[
|
||||||
|
|
@ -136,6 +157,7 @@ AC_DEFUN([AX_PATH_GENERIC],[
|
||||||
$4
|
$4
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
])
|
||||||
|
|
||||||
popdef([UP])
|
popdef([UP])
|
||||||
popdef([DOWN])
|
popdef([DOWN])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue