]> git.saurik.com Git - wxWidgets.git/blob - wx-config.in
fixed bug 418496 (wxDC::SetClippingRegion doesn't clear the previous clipping region)
[wxWidgets.git] / wx-config.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6 CC="@CC@"
7 CXX="@CXX@"
8 LD="@SHARED_LD@"
9
10 usage()
11 {
12 cat <<EOF
13 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
14 [--libs] [--cppflags] [--cflags] [--cxxflags]
15 [--cc] [--cxx] [--ld]
16
17 wx-config returns configuration information about the installed
18 version of wxWindows. It may be used to query its version and
19 installation directories and also retrieve the C and C++ compilers
20 and linker which were used for its building and the corresponding
21 flags.
22 EOF
23
24 exit $1
25 }
26
27 cppflags()
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
38 if test $# -eq 0; then
39 usage 1 1>&2
40 fi
41
42 while 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
97 done
98