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