]> git.saurik.com Git - wxWidgets.git/blob - wx-config.in
found another object that nobody appears to have ever used in a dll.
[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 cross_compiling=@cross_compiling@
10 target=@host_alias@
11
12 usage()
13 {
14 cat <<EOF
15 Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
16 [--libs] [--gl-libs] [--cppflags] [--cflags] [--cxxflags] [--rezflags]
17 [--cc] [--cxx] [--ld]
18
19 wx-config returns configuration information about the installed
20 version of wxWindows. It may be used to query its version and
21 installation directories and also retrieve the C and C++ compilers
22 and linker which were used for its building and the corresponding
23 flags.
24 EOF
25
26 exit $1
27 }
28
29 cppflags()
30 {
31 if test "@includedir@" != "/usr/include" \
32 -a "@includedir@" != "/usr/include/c++" \
33 -a \( "${cross_compiling}" != "yes" \
34 -o "@includedir@" != "/usr/${target}/include" \) ;
35 then
36 includes=-I@includedir@
37 fi
38 includes="-I@libdir@/wx/include/@TOOLCHAIN_NAME@ $includes"
39 echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @WXCONFIG_INCLUDE@
40 }
41
42 if test $# -eq 0; then
43 usage 1 1>&2
44 fi
45
46 while test $# -gt 0; do
47 case "$1" in
48 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
49 *) optarg= ;;
50 esac
51
52 case $1 in
53 --prefix=*)
54 prefix=$optarg
55 if test $exec_prefix_set = no ; then
56 exec_prefix=$optarg
57 fi
58 ;;
59 --prefix)
60 echo $prefix
61 ;;
62 --exec-prefix=*)
63 exec_prefix=$optarg
64 exec_prefix_set=yes
65 ;;
66 --exec-prefix)
67 echo $exec_prefix
68 ;;
69 --version)
70 echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
71 ;;
72 --cppflags)
73 cppflags
74 ;;
75 --cflags)
76 echo `cppflags` @CODE_GEN_FLAGS@
77 ;;
78 --cxxflags)
79 echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
80 ;;
81 --rezflags)
82 echo @LIBWXMACRESWXCONFIG@
83 ;;
84 --libs)
85 if test "@libdir@" != "/usr/lib" \
86 -a \( "${cross_compiling}" != "yes" \
87 -o "@libdir@" != "/usr/${target}/lib" \) ;
88 then
89 libs="-L@libdir@"
90 fi
91 echo $libs @WXCONFIG_LIBS@ @EXTRA_LIBS@
92 ;;
93 --gl-libs)
94 echo @WXCONFIG_LIBS_GL@
95 ;;
96 --cc)
97 echo $CC
98 ;;
99 --cxx)
100 echo $CXX
101 ;;
102 --ld)
103 echo $LD
104 ;;
105 *)
106 usage 1 1>&2
107 ;;
108 esac
109 shift
110 done
111