4 exec_prefix
=@exec_prefix@
11 builddir
=@top_builddir@
12 cross_compiling
=@cross_compiling@
14 static_flag
=@STATIC_FLAG@
16 # return the absolute path prepending builddir to it if needed
20 # TODO: this only works under Unix and even there it could be
21 # enhanced to remove ".." and "."
22 if [ `echo $path | sed 's/^\(.\).*/\1/'` != "/" ]; then
23 if [ $path = "." ]; then
26 path
="$builddir/$path"
36 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--static]
38 [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags]
41 wx-config returns configuration information about the installed
42 version of wxWindows. It may be used to query its version and
43 installation directories and also retrieve the C and C++ compilers
44 and linker which were used for its building and the corresponding
47 Ordinarily it should be installed to the appropriate system location
48 along with the headers and library files, but it is also possible to
49 use it to enable builds with an uninstalled wxWindows version for
50 package building and bleeding edge developers. To do so, use it like
53 \${wx_builddir}/wx-config --prefix=\${wx_srcdir} --exec-prefix=\${wx_builddir}
55 Note that any other options supplied must come *after* the prefix
56 specification for it to take effect.
65 # we should never specify -I/usr/include on the compiler command line: this
66 # is at best useless and at worst breaks compilation on the systems where
67 # the system headers are non-ANSI because gcc works around this by storing
68 # the ANSI-fied versions of them in its private directory which is searched
69 # after all the directories on the cmd line.
71 # the situation is a bit more complicated with -I/usr/local/include: again,
72 # it shouldn't be specified with gcc which looks there by default anyhow
73 # and gives warnings (at least 3.1 does) if it is specified explicitly --
74 # but this -I switch *is* needed for the other compilers
76 # note that we assume that if we use GNU cc we also use GNU c++ and vice
77 # versa, i.e. this won't work (either for --cflags or --cxxflags) if GNU C
78 # compiler and non-GNU C++ compiler are used or vice versa -- we'll fix
79 # this when/if anybody complains about it
80 if test "@includedir@" != "/usr/include" \
81 -a "@includedir@" != "/usr/include/c++" \
82 -a \
( "${GCC}" != "yes" \
83 -o "@includedir@" != "/usr/local/include" \
) \
84 -a \
( "${cross_compiling}" != "yes" \
85 -o "@includedir@" != "/usr/${target}/include" \
) ;
87 includes
=" -I@includedir@"
90 includes
="-I@libdir@/wx/include/@TOOLCHAIN_NAME@$includes"
92 if test $static_flag = yes ; then
93 echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @WXCONFIG_INCLUDE@ @WX_LARGEFILE_FLAGS@
95 echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @TOOLCHAIN_DLL_DEFS@ @WXCONFIG_INCLUDE@ @WX_LARGEFILE_FLAGS@
99 if test $# -eq 0; then
103 while test $# -gt 0; do
105 -*=*) optarg
=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 prefix
=`makeabs $srcdir`
112 exec_prefix
=`makeabs $builddir`
117 if test $exec_prefix_set = no
; then
132 echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
141 echo `cppflags` @CODE_GEN_FLAGS@
144 echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
150 echo @MACRESWXCONFIG@
153 if test "@libdir@" != "/usr/lib" \
154 -a \
( "${cross_compiling}" != "yes" \
155 -o "@libdir@" != "/usr/${target}/lib" \
) ;
160 if test $static_flag = yes ; then
161 echo "$libs @LDFLAGS@ @WXCONFIG_RPATH@ @libdir@/@WXCONFIG_LIBS_STATIC@ @LIBS@ @DMALLOC_LIBS@"
163 echo $libs @LDFLAGS@ @WXCONFIG_RPATH@ @WXCONFIG_LIBS@ @DMALLOC_LIBS@
168 if test $static_flag = yes -a "x" != "x@WXCONFIG_LIBS_STATIC_GL@" ; then
169 gllibs
="@libdir@/@WXCONFIG_LIBS_STATIC_GL@"
171 gllibs
="@WXCONFIG_LIBS_GL@"
173 echo @LDFLAGS_GL@
$gllibs