4 exec_prefix
=@exec_prefix@
10 cross_compiling
=@cross_compiling@
12 static_flag
=@STATIC_FLAG@
18 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--static]
20 [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags]
24 wx-config returns configuration information about the installed
25 version of wxWindows. It may be used to query its version and
26 installation directories and also retrieve the C and C++ compilers
27 and linker which were used for its building and the corresponding
30 The --inplace flag allows wx-config to be used from the wxWindows
31 build directory and output flags to use the uninstalled version of
32 the headers and libs in the build directory. (Currently configure
33 must be invoked via a full path name for this to work correctly.)
41 # we should never specify -I/usr/include on the compiler command line: this
42 # is at best useless and at worst breaks compilation on the systems where
43 # the system headers are non-ANSI because gcc works around this by storing
44 # the ANSI-fied versions of them in its private directory which is searched
45 # after all the directories on the cmd line.
47 # the situation is a bit more complicated with -I/usr/local/include: again,
48 # it shouldn't be specified with gcc which looks there by default anyhow
49 # and gives warnings (at least 3.1 does) if it is specified explicitly --
50 # but this -I switch *is* needed for the other compilers
52 # note that we assume that if we use GNU cc we also use GNU c++ and vice
53 # versa, i.e. this won't work (either for --cflags or --cxxflags) if GNU C
54 # compiler and non-GNU C++ compiler are used or vice versa -- we'll fix
55 # this when/if anybody complains about it
56 if test "@includedir@" != "/usr/include" \
57 -a "@includedir@" != "/usr/include/c++" \
58 -a \
( "${GCC}" != "yes" \
59 -o "@includedir@" != "/usr/local/include" \
) \
60 -a \
( "${cross_compiling}" != "yes" \
61 -o "@includedir@" != "/usr/${target}/include" \
) ;
63 includes
=" -I@includedir@"
66 if test $inplace_flag = yes ; then
67 includes
="-I$inplace_builddir/lib/wx/include/@TOOLCHAIN_NAME@ -I$inplace_include"
69 includes
="-I@libdir@/wx/include/@TOOLCHAIN_NAME@$includes"
72 if test $static_flag = yes ; then
73 echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @WXCONFIG_INCLUDE@ @WX_LARGEFILE_FLAGS@
75 echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @TOOLCHAIN_DLL_DEFS@ @WXCONFIG_INCLUDE@ @WX_LARGEFILE_FLAGS@
79 if test $# -eq 0; then
83 while test $# -gt 0; do
85 -*=*) optarg
=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
92 if test $exec_prefix_set = no
; then
107 echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
116 echo `cppflags` @CODE_GEN_FLAGS@
119 echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
125 echo @LIBWXMACRESWXCONFIG@
128 if test "@libdir@" != "/usr/lib" \
129 -a \
( "${cross_compiling}" != "yes" \
130 -o "@libdir@" != "/usr/${target}/lib" \
) ;
135 if test $inplace_flag = yes ; then
136 libs
="-L$inplace_builddir/lib"
139 if test $static_flag = yes ; then
140 echo "$libs @LDFLAGS@ @WXCONFIG_RPATH@ @libdir@/@WXCONFIG_LIBS_STATIC@ @LIBS@ @DMALLOC_LIBS@"
142 echo $libs @LDFLAGS@ @WXCONFIG_RPATH@ @WXCONFIG_LIBS@ @DMALLOC_LIBS@
147 if test $static_flag = yes -a "x" != "x@WXCONFIG_LIBS_STATIC_GL@" ; then
148 gllibs
="@libdir@/@WXCONFIG_LIBS_STATIC_GL@"
150 gllibs
="@WXCONFIG_LIBS_GL@"
152 if test $inplace_flag = yes ; then
153 libdir
="-L$inplace_builddir/lib"
155 echo @LDFLAGS_GL@
$libdir $gllibs
168 inplace_builddir
=`dirname $0`
169 inplace_include
=@top_srcdir@
/include