]> git.saurik.com Git - wxWidgets.git/blame_incremental - wx-config.in
compilation fix for cygwin/old mingw32 (patch 446700)
[wxWidgets.git] / wx-config.in
... / ...
CommitLineData
1#!/bin/sh
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5exec_prefix_set=no
6CC="@CC@"
7CXX="@CXX@"
8LD="@SHARED_LD@"
9
10usage()
11{
12 cat <<EOF
13Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
14 [--libs] [--cppflags] [--cflags] [--cxxflags]
15 [--cc] [--cxx] [--ld]
16
17wx-config returns configuration information about the installed
18version of wxWindows. It may be used to query its version and
19installation directories and also retrieve the C and C++ compilers
20and linker which were used for its building and the corresponding
21flags.
22EOF
23
24 exit $1
25}
26
27cppflags()
28{
29 if test @includedir@ != /usr/include ; then
30 if test @includedir@ != /usr/include/c++ ; then
31 includes=-I@includedir@
32 fi
33 fi
34 includes="$includes -I@libdir@/wx/include -D__USE_WXCONFIG__"
35 echo $includes @WXDEBUG_DEFINE@ @TOOLKIT_DEF@ @WXCONFIG_INCLUDE@
36}
37
38if test $# -eq 0; then
39 usage 1 1>&2
40fi
41
42while test $# -gt 0; do
43 case "$1" in
44 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
45 *) optarg= ;;
46 esac
47
48 case $1 in
49 --prefix=*)
50 prefix=$optarg
51 if test $exec_prefix_set = no ; then
52 exec_prefix=$optarg
53 fi
54 ;;
55 --prefix)
56 echo $prefix
57 ;;
58 --exec-prefix=*)
59 exec_prefix=$optarg
60 exec_prefix_set=yes
61 ;;
62 --exec-prefix)
63 echo $exec_prefix
64 ;;
65 --version)
66 echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
67 ;;
68 --cppflags)
69 cppflags
70 ;;
71 --cflags)
72 echo `cppflags` @CODE_GEN_FLAGS@
73 ;;
74 --cxxflags)
75 echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
76 ;;
77 --libs)
78 if test @libdir@ != /usr/lib ; then
79 libs="-L@libdir@"
80 fi
81 echo $libs -l@WX_LIBRARY@ @EXTRA_LIBS@
82 ;;
83 --cc)
84 echo $CC
85 ;;
86 --cxx)
87 echo $CXX
88 ;;
89 --ld)
90 echo $LD
91 ;;
92 *)
93 usage 1 1>&2
94 ;;
95 esac
96 shift
97done
98