]> git.saurik.com Git - wxWidgets.git/blame - wx-config.in
Visualage fixes for Stefan's socket implementations and true to TRUE in db.cpp
[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@"
9a98a854 9
75f4be8a
VZ
10usage()
11{
12 cat <<EOF
13Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
14 [--libs] [--cppflags] [--cflags] [--cxxflags]
15 [--cc] [--cxx] [--ld]
16
17wx-config returns configuration information about the installed
18version of wxWindows. It may be used to query its version and
19installation directories and also retrieve the C and C++ compilers
20and linker which were used for its building and the corresponding
21flags.
22EOF
23
24 exit $1
25}
26
27cppflags()
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}
9a98a854
VZ
37
38if test $# -eq 0; then
75f4be8a 39 usage 1 1>&2
9a98a854
VZ
40fi
41
42while 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)
79144b8a 66 echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@
9a98a854 67 ;;
75f4be8a
VZ
68 --cppflags)
69 cppflags
70 ;;
9a98a854 71 --cflags)
75f4be8a
VZ
72 echo `cppflags` @CODE_GEN_FLAGS@
73 ;;
74 --cxxflags)
75 echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@
9a98a854
VZ
76 ;;
77 --libs)
78 if test @libdir@ != /usr/lib ; then
79 libs="-L@libdir@"
80 fi
2b6f061f 81 echo $libs -l@WX_LIBRARY@ @EXTRA_LIBS@
9a98a854 82 ;;
6ce73557
VZ
83 --cc)
84 echo $CC
85 ;;
86 --cxx)
87 echo $CXX
88 ;;
89 --ld)
90 echo $LD
91 ;;
9a98a854 92 *)
75f4be8a 93 usage 1 1>&2
9a98a854
VZ
94 ;;
95 esac
96 shift
97done
98