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