*** empty log message ***

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-07-18 11:19:34 +00:00
parent 04bd3f56d2
commit 8708fa7618
9 changed files with 268 additions and 76 deletions

View File

@@ -7411,8 +7411,10 @@ samples:
install-wxconfig: install-wxconfig:
$(INSTALL_DIR) $(DESTDIR)$(bindir) $(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) wx$(TOOLCHAIN_NAME)-config $(DESTDIR)$(bindir) $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/config
(cd $(DESTDIR)$(bindir) && rm -f wx-config && $(LN_S) wx$(TOOLCHAIN_NAME)-config wx-config) $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_NAME) $(DESTDIR)$(libdir)/wx/config
$(INSTALL_PROGRAM) wx-config $(DESTDIR)$(bindir)
(cd $(DESTDIR)$(bindir) && rm -f wx$(TOOLCHAIN_NAME)-config && $(LN_S) wx-config wx$(TOOLCHAIN_NAME)-config)
locale_install: locale_install:
$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale
@@ -19826,6 +19828,7 @@ ALL_DIST: distrib_clean
cp $(WXDIR)/install-sh $(DISTDIR) cp $(WXDIR)/install-sh $(DISTDIR)
cp $(WXDIR)/mkinstalldirs $(DISTDIR) cp $(WXDIR)/mkinstalldirs $(DISTDIR)
cp $(WXDIR)/wx-config.in $(DISTDIR) cp $(WXDIR)/wx-config.in $(DISTDIR)
cp $(WXDIR)/wx-config-wrapper.in $(DISTDIR)
cp $(WXDIR)/version-script.in $(DISTDIR) cp $(WXDIR)/version-script.in $(DISTDIR)
cp $(WXDIR)/setup.h.in $(DISTDIR) cp $(WXDIR)/setup.h.in $(DISTDIR)
cp $(WXDIR)/setup.h_vms $(DISTDIR) cp $(WXDIR)/setup.h_vms $(DISTDIR)

View File

@@ -77,6 +77,7 @@ ALL_DIST: distrib_clean
cp $(WXDIR)/install-sh $(DISTDIR) cp $(WXDIR)/install-sh $(DISTDIR)
cp $(WXDIR)/mkinstalldirs $(DISTDIR) cp $(WXDIR)/mkinstalldirs $(DISTDIR)
cp $(WXDIR)/wx-config.in $(DISTDIR) cp $(WXDIR)/wx-config.in $(DISTDIR)
cp $(WXDIR)/wx-config-wrapper.in $(DISTDIR)
cp $(WXDIR)/version-script.in $(DISTDIR) cp $(WXDIR)/version-script.in $(DISTDIR)
cp $(WXDIR)/setup.h.in $(DISTDIR) cp $(WXDIR)/setup.h.in $(DISTDIR)
cp $(WXDIR)/setup.h_vms $(DISTDIR) cp $(WXDIR)/setup.h_vms $(DISTDIR)

View File

@@ -64,8 +64,10 @@
<dependency-of>install</dependency-of> <dependency-of>install</dependency-of>
<command> <command>
$(INSTALL_DIR) $(DESTDIR)$(BINDIR) $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) wx$(TOOLCHAIN_NAME)-config $(DESTDIR)$(BINDIR) $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
(cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) wx$(TOOLCHAIN_NAME)-config wx-config) $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_NAME) $(DESTDIR)$(LIBDIR)/wx/config
$(INSTALL_PROGRAM) wx-config $(DESTDIR)$(BINDIR)
(cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx$(TOOLCHAIN_NAME)-config &amp;&amp; $(LN_S) wx-config wx$(TOOLCHAIN_NAME)-config)
</command> </command>
</action> </action>

24
configure vendored
View File

@@ -41060,7 +41060,7 @@ fi
ac_config_headers="$ac_config_headers setup.h" ac_config_headers="$ac_config_headers setup.h"
ac_config_files="$ac_config_files wx-config version-script Makefile" ac_config_files="$ac_config_files wx-config wx-config-wrapper version-script Makefile"
ac_config_commands="$ac_config_commands default" ac_config_commands="$ac_config_commands default"
@@ -41771,6 +41771,7 @@ do
case "$ac_config_target" in case "$ac_config_target" in
# Handling of arguments. # Handling of arguments.
"wx-config" ) CONFIG_FILES="$CONFIG_FILES wx-config" ;; "wx-config" ) CONFIG_FILES="$CONFIG_FILES wx-config" ;;
"wx-config-wrapper" ) CONFIG_FILES="$CONFIG_FILES wx-config-wrapper" ;;
"version-script" ) CONFIG_FILES="$CONFIG_FILES version-script" ;; "version-script" ) CONFIG_FILES="$CONFIG_FILES version-script" ;;
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"$mk" ) CONFIG_FILES="$CONFIG_FILES $mk" ;; "$mk" ) CONFIG_FILES="$CONFIG_FILES $mk" ;;
@@ -42752,18 +42753,15 @@ esac
echo "$as_me: executing $ac_dest commands" >&6;} echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in case $ac_dest in
default ) default )
if test ! -h wx-config; then
chmod +x wx-config
mv wx-config wx${TOOLCHAIN_NAME}-config
${LN_S} wx${TOOLCHAIN_NAME}-config wx-config
fi
if test ! -d lib; then if test ! -d lib; then
mkdir lib mkdir lib
fi fi
if test ! -d lib/wx; then if test ! -d lib/wx; then
mkdir lib/wx mkdir lib/wx
fi fi
if test ! -d lib/wx/config; then
mkdir lib/wx/config
fi
if test ! -d lib/wx/include; then if test ! -d lib/wx/include; then
mkdir lib/wx/include mkdir lib/wx/include
fi fi
@@ -42776,6 +42774,18 @@ echo "$as_me: executing $ac_dest commands" >&6;}
if test -f setup.h; then if test -f setup.h; then
mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h
fi fi
if test -f wx-config; then
chmod +x wx-config
mv -f wx-config lib/wx/config/${TOOLCHAIN_NAME}
rm -f wx${TOOLCHAIN_NAME}-config
${LN_S} wx-config wx${TOOLCHAIN_NAME}-config
fi
if test -f wx-config-wrapper; then
chmod +x wx-config-wrapper
mv -f wx-config-wrapper wx-config
fi
;; ;;
esac esac
done done

View File

@@ -6239,31 +6239,22 @@ dnl (the original file name may be overriden by appending another name after a
dnl colon) dnl colon)
AC_CONFIG_FILES([ AC_CONFIG_FILES([
wx-config wx-config
wx-config-wrapper
version-script version-script
Makefile Makefile
]) ])
AC_CONFIG_COMMANDS([default], AC_CONFIG_COMMANDS([default],
[ [
dnl This test is required to make the following idempotent.
dnl Otherwise running config.status or rerunning configure
dnl would stomp the wx-config link or try to move it onto
dnl itself.
dnl Use -h instead of -L to test for link (GD)
dnl -h is documented as obsolete under Mac OS X but works
dnl -L is obsolete under Solaris8
if test ! -h wx-config; then
chmod +x wx-config
mv wx-config wx${TOOLCHAIN_NAME}-config
${LN_S} wx${TOOLCHAIN_NAME}-config wx-config
fi
if test ! -d lib; then if test ! -d lib; then
mkdir lib mkdir lib
fi fi
if test ! -d lib/wx; then if test ! -d lib/wx; then
mkdir lib/wx mkdir lib/wx
fi fi
if test ! -d lib/wx/config; then
mkdir lib/wx/config
fi
if test ! -d lib/wx/include; then if test ! -d lib/wx/include; then
mkdir lib/wx/include mkdir lib/wx/include
fi fi
@@ -6276,6 +6267,18 @@ AC_CONFIG_COMMANDS([default],
if test -f setup.h; then if test -f setup.h; then
mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h
fi fi
if test -f wx-config; then
chmod +x wx-config
mv -f wx-config lib/wx/config/${TOOLCHAIN_NAME}
rm -f wx${TOOLCHAIN_NAME}-config
${LN_S} wx-config wx${TOOLCHAIN_NAME}-config
fi
if test -f wx-config-wrapper; then
chmod +x wx-config-wrapper
mv -f wx-config-wrapper wx-config
fi
], ],
[ [
TOOLCHAIN_NAME="${TOOLCHAIN_NAME}" TOOLCHAIN_NAME="${TOOLCHAIN_NAME}"

View File

@@ -221,6 +221,8 @@ Unix:
- wxTaskBarIcon now supports freedesktop.org System Tray protocol - wxTaskBarIcon now supports freedesktop.org System Tray protocol
- security fixes to wxSingleInstanceChecker - security fixes to wxSingleInstanceChecker
- wx-config script was modified to allow choosing from multiple installed
builds of wxWidgets
wxGTK: wxGTK:

180
wx-config-wrapper.in Executable file
View File

@@ -0,0 +1,180 @@
#!/bin/sh
# -------------------------------------------------------------------------
# Location of wx:
# -------------------------------------------------------------------------
update_prefixes()
{
includedir="@includedir@"
libdir="@libdir@"
}
prefix="@prefix@"
exec_prefix="@exec_prefix@"
update_prefixes
srcdir="@top_srcdir@"
builddir="@top_builddir_wxconfig@"
# -------------------------------------------------------------------------
# Wrapper script:
# -------------------------------------------------------------------------
exec_prefix_set=no
# return the absolute path prepending builddir to it if needed
makeabs()
{
path=$1
# TODO: this only works under Unix and even there it could be
# enhanced to remove ".." and "."
if [ `echo $path | sed 's/^\(.\).*/\1/'` != "/" ]; then
if [ $path = "." ]; then
path=$builddir
else
path="$builddir/$path"
fi
fi
echo $path
}
# these determine wx-config script to use:
m_toolkit='*'
m_univ='*'
m_unicode='*'
m_debug='*'
m_version='*.*'
# lists all wx-config scripts that match criteria specified above
list_wx_config_scripts()
{
mask="${m_toolkit}${m_univ}${m_unicode}${m_debug}-${m_version}"
# if wx-config was called via wx$TOOLCHAIN_NAME-config symlink,
# try to extract the mask from it:
myname=`basename $0`
if test $myname != wx-config ; then
toolchain=`echo $myname | sed 's/wx\(.*\)-config/\1/'`
if test -f ${libdir}/wx/config/${toolchain} ; then
mask=$toolchain
fi
fi
if test -d ${libdir}/wx/config ; then
(cd ${libdir}/wx/config/ && ls -1 $mask 2>/dev/null)
fi
}
# find first wx-config script that matches criteria
find_wx_config_script()
{
all_scripts=`list_wx_config_scripts`
# unless wxBase was explicitly requested, try to find a GUI version:
if test "$m_toolkit" != "base" ; then
script=`echo $all_scripts | tr ' ' '\n' | grep -v '^base' | head -n 1`
if test "x$script" != "x" ; then
echo ${libdir}/wx/config/${script}
fi
fi
# otherwise (or if no GUI script was found), use alphabetically 1st script:
script=`echo $all_scripts | head -n 1`
if test -z "$script" ; then
echo "no suitable wx-config script found" >&2
exit 1
fi
echo ${libdir}/wx/config/${script}
}
# handle options:
# arguments to pass to the real wx-config script:
args=""
for i in $*; do
case "$i" in
-*=*) optarg=`echo "$i" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $i in
--inplace)
prefix=`makeabs $srcdir`
exec_prefix=`makeabs $builddir`
exec_prefix_set=yes
update_prefixes
args="$args --inplace"
;;
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
update_prefixes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
update_prefixes
;;
--list)
# list available wx versions:
list_wx_config_scripts
exit
;;
--toolkit=*)
m_toolkit=$optarg
;;
--version=*)
m_version=$optarg
;;
--unicode=*)
if test "x$optarg" = "xyes" ; then
m_unicode="u"
else
m_unicode=""
fi
;;
--unicode)
m_unicode="u"
;;
--debug=*)
if test "x$optarg" = "xyes" ; then
m_debug="d"
else
m_debug=""
fi
;;
--debug)
m_debug="d"
;;
--universal=*)
if test "x$optarg" = "xyes" ; then
m_univ="univ"
else
m_univ=""
fi
;;
--universal)
m_univ="univ"
;;
*)
args="$args $i"
;;
esac
done
args="$args --prefix=$prefix --exec-prefix=$exec_prefix"
script=`find_wx_config_script`;
if test "x$script" != "x" ; then
$script $args
exit $?
else
exit 1
fi

View File

@@ -144,29 +144,13 @@ get_ldflags_gui()
echo $flags_to_ret echo $flags_to_ret
} }
# return the absolute path prepending builddir to it if needed
makeabs()
{
path=$1
# TODO: this only works under Unix and even there it could be
# enhanced to remove ".." and "."
if [ `echo $path | sed 's/^\(.\).*/\1/'` != "/" ]; then
if [ $path = "." ]; then
path=$builddir
else
path="$builddir/$path"
fi
fi
echo $path
}
usage() usage()
{ {
cat <<EOF cat <<EOF
Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--inplace] Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--inplace]
[--version] [--release] [--toolkit=TOOLKIT] [--unicode[=yes|no]] [--debug[=yes|no]]
[--basename] [--static] [--libs] [--gl-libs] [--universal[=yes|no]] [--version[=VERSION]] [--release]
[--list] [--basename] [--static] [--libs] [--gl-libs]
[--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags] [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags]
[--cc] [--cxx] [--ld] [LIBRARIES] [--cc] [--cxx] [--ld] [LIBRARIES]
@@ -197,6 +181,11 @@ in by default.
--gl-libs option is deprecated, use "--libs gl" instead. --gl-libs option is deprecated, use "--libs gl" instead.
If there are several different builds of wxWidgets installed in same prefix,
you can use --toolkit, --unicode, --debug, --universal and --version options
to select one of them. Use --list option to show all available builds that
match given criteria.
EOF EOF
exit $1 exit $1
@@ -305,11 +294,7 @@ while test $# -gt 0; do
case $1 in case $1 in
--inplace) --inplace)
prefix=`makeabs $srcdir`
exec_prefix=`makeabs $builddir`
exec_prefix_set=yes
inplace_flag=yes inplace_flag=yes
update_prefixes
;; ;;
--prefix=*) --prefix=*)
prefix=$optarg prefix=$optarg

View File

@@ -53,7 +53,7 @@ AC_DEFUN([AM_OPTIONS_WXCONFIG],
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
dnl [, WX-LIBS]]]) dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]])
dnl dnl
dnl Test for wxWindows, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC dnl Test for wxWindows, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
dnl (the latter is for static linking against wxWindows). Set WX_CONFIG_NAME dnl (the latter is for static linking against wxWindows). Set WX_CONFIG_NAME
@@ -61,13 +61,18 @@ dnl environment variable to override the default name of the wx-config script
dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this
dnl case the macro won't even waste time on tests for its existence. dnl case the macro won't even waste time on tests for its existence.
dnl dnl
dnl Optional WX-LIBS argument contains comma-separated list of wxWindows dnl Optional WX-LIBS argument contains comma- or space-separated list of
dnl libraries to link against (it may include contrib libraries). If it is not dnl wxWindows libraries to link against (it may include contrib libraries). If
dnl specified then WX_LIBS and WX_LIBS_STATIC will contain flags to link dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to
dnl with all of the core wxWindows libraries. dnl link with all of the core wxWindows libraries.
dnl
dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
dnl invocation command in present. It can be used to fine-tune lookup of
dnl best wxWidgets build available.
dnl dnl
dnl Example use: dnl Example use:
dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]) dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
dnl [--unicode --debug])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl dnl
@@ -94,10 +99,6 @@ AC_DEFUN([AM_PATH_WXCONFIG],
WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
fi fi
if test "x$4" != "x" ; then
wx_config_args="$wx_config_args $4"
fi
dnl don't search the PATH if WX_CONFIG_NAME is absolute filename dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
if test -x "$WX_CONFIG_NAME" ; then if test -x "$WX_CONFIG_NAME" ; then
AC_MSG_CHECKING(for wx-config) AC_MSG_CHECKING(for wx-config)
@@ -112,11 +113,15 @@ AC_DEFUN([AM_PATH_WXCONFIG],
no_wx="" no_wx=""
min_wx_version=ifelse([$1], ,2.2.1,$1) min_wx_version=ifelse([$1], ,2.2.1,$1)
AC_MSG_CHECKING(for wxWindows version >= $min_wx_version) if test -z "$5" ; then
AC_MSG_CHECKING([for wxWindows version >= $min_wx_version])
else
AC_MSG_CHECKING([for wxWindows version >= $min_wx_version ($5)])
fi
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args" WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4"
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version` WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
wx_config_major_version=`echo $WX_VERSION | \ wx_config_major_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
wx_config_minor_version=`echo $WX_VERSION | \ wx_config_minor_version=`echo $WX_VERSION | \
@@ -132,6 +137,7 @@ AC_DEFUN([AM_PATH_WXCONFIG],
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
wx_ver_ok="" wx_ver_ok=""
if test "x$WX_VERSION" != x ; then
if test $wx_config_major_version -gt $wx_requested_major_version; then if test $wx_config_major_version -gt $wx_requested_major_version; then
wx_ver_ok=yes wx_ver_ok=yes
else else
@@ -147,13 +153,13 @@ AC_DEFUN([AM_PATH_WXCONFIG],
fi fi
fi fi
fi fi
fi
if test "x$wx_ver_ok" = x ; then if test "x$wx_ver_ok" = x ; then
no_wx=yes no_wx=yes
else else
wx_libs_arg="--libs" WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
WX_LIBS=`$WX_CONFIG_WITH_ARGS $wx_libs_arg` WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs`
WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static $wx_libs_arg`
dnl starting with version 2.2.6 wx-config has --cppflags argument dnl starting with version 2.2.6 wx-config has --cppflags argument
wx_has_cppflags="" wx_has_cppflags=""