X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a43ed08aa8f39c31feebd5cc0d079b0a855082b6..236d7be30109bdc203d4aab3ff5d11d309a8f359:/wx-config.in diff --git a/wx-config.in b/wx-config.in index 45390a503c..262e6db5ec 100755 --- a/wx-config.in +++ b/wx-config.in @@ -9,13 +9,13 @@ WX_MAJOR_VERSION_NUMBER="@WX_MAJOR_VERSION_NUMBER@" WX_MINOR_VERSION_NUMBER="@WX_MINOR_VERSION_NUMBER@" WX_RELEASE_NUMBER="@WX_RELEASE_NUMBER@" +WX_SUBRELEASE_NUMBER="@WX_SUBRELEASE_NUMBER@" release="@WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@" is_monolithic="@MONOLITHIC@" cross_compiling="@cross_compiling@" target="@host_alias@" static_flag="@STATIC_FLAG@" inplace_flag="no" -nogui_flag="no" # Misc configuration variables: @@ -30,7 +30,6 @@ update_prefixes CC="@CC@" GCC="@GCC@" -GCC_SEARCHES_USR_LOCAL_INCLUDE="@GCC_SEARCHES_USR_LOCAL_INCLUDE@" CXX="@CXX@" LD="@SHARED_LD@" srcdir="@top_srcdir@" @@ -145,31 +144,16 @@ get_ldflags_gui() 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() { cat <&2 fi + +# handle libraries list: + +libs_list="" + +for arg in $*; do + case "$arg" in + -*) + ;; + *) + libs_list="$libs_list `echo "$arg" | tr ',' ' '`" + ;; + esac +done + +if test "x$libs_list" = "x" ; then + if test "$is_monolithic" = "0" ; then + # link against all libs if none given explicitly: + libs_list="$CORE_GUI_LIBS $CORE_BASE_LIBS" + fi +else + # always add wxBase, any wxApp needs it: + libs_list="$libs_list base" +fi + +# determine if at least one gui lib was used: +nogui_flag="yes" +for i in $libs_list; do + case $i in + base|net) + ;; + *) + nogui_flag="no" + ;; + esac +done + + +# handle options: + while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; @@ -270,11 +270,7 @@ while test $# -gt 0; do case $1 in --inplace) - prefix=`makeabs $srcdir` - exec_prefix=`makeabs $builddir` - exec_prefix_set=yes inplace_flag=yes - update_prefixes ;; --prefix=*) prefix=$optarg @@ -297,6 +293,9 @@ while test $# -gt 0; do --version) echo ${WX_MAJOR_VERSION_NUMBER}.${WX_MINOR_VERSION_NUMBER}.${WX_RELEASE_NUMBER} ;; + --version-full) + echo ${WX_MAJOR_VERSION_NUMBER}.${WX_MINOR_VERSION_NUMBER}.${WX_RELEASE_NUMBER}.${WX_SUBRELEASE_NUMBER} + ;; --release) echo $release ;; @@ -322,19 +321,7 @@ while test $# -gt 0; do echo `eval echo ${MACRESWXCONFIG}` ;; - --libs*) - # find if the argument was --libs=list,of,libs or --libs: - if test "x$optarg" = "x" ; then - if test "$is_monolithic" = "0" ; then - # link against all libs if none given explicitly: - libs_list="$CORE_GUI_LIBS $CORE_BASE_LIBS" - fi - else - libs_list=`echo "$optarg" | tr ',' ' '` - # always add wxBase, any wxApp needs it: - libs_list="$libs_list base" - fi - + --libs) # include install directory only if it is not default: if test "${libdir}" != "/usr/lib" \ -a \( "${cross_compiling}" != "yes" \ @@ -369,11 +356,9 @@ while test $# -gt 0; do # we may need to replace "std" alias with its expansion newlist= hadstd=0 - hadgui=0 for i in $libs_list; do case $i in std) - hadgui=1 hadstd=1 ;; @@ -385,12 +370,7 @@ while test $# -gt 0; do fi ;; - net) - newlist="$newlist $i" - ;; - *) - hadgui=1 newlist="$newlist $i" ;; esac @@ -400,10 +380,6 @@ while test $# -gt 0; do libs_list="$libs_list $CORE_GUI_LIBS $CORE_BASE_LIBS" fi - if [ $hadgui = 0 ]; then - nogui_flag="yes" - fi - # in multilib mode, link against all sublibraries: wxlibs=`output_libs $libs_list` guildflags=`get_ldflags_gui $libs_list` @@ -423,7 +399,11 @@ while test $# -gt 0; do --ld) echo $LD ;; - *) + --help|-h) + usage 1 1>&2 + ;; + -*) + # unrecognized flag is error usage 1 1>&2 ;; esac