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