comparison dw-config.in @ 80:5e4730c42014

Added dw-config script to solve build problems.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 27 Mar 2002 10:33:44 +0000
parents
children dea8021b4f47
comparison
equal deleted inserted replaced
79:8082cb0e7c2e 80:5e4730c42014
1 #!/bin/sh
2
3 dw_libs="@LIBS@"
4 dw_cflags="@CFLAGS@"
5
6 prefix=@prefix@
7 exec_prefix=@exec_prefix@
8 exec_prefix_set=no
9
10 usage()
11 {
12 cat <<EOF
13 Usage: dw-config [OPTIONS]
14 Options:
15 [--prefix[=DIR]]
16 [--exec-prefix[=DIR]]
17 [--version]
18 [--libs]
19 [--cflags]
20 EOF
21 exit $1
22 }
23
24 if test $# -eq 0; then
25 usage 1 1>&2
26 fi
27
28 while test $# -gt 0; do
29 case "$1" in
30 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
31 *) optarg= ;;
32 esac
33
34 case $1 in
35 --prefix=*)
36 prefix=$optarg
37 if test $exec_prefix_set = no ; then
38 exec_prefix=$optarg
39 fi
40 ;;
41 --prefix)
42 echo_prefix=yes
43 ;;
44 --exec-prefix=*)
45 exec_prefix=$optarg
46 exec_prefix_set=yes
47 ;;
48 --version)
49 echo @DW_MAJOR_VERSION@.@DW_MINOR_VERSION@.@DW_SUB_VERSION@
50 ;;
51 --cflags)
52 echo_cflags=yes
53 ;;
54 --libs)
55 echo_libs=yes
56 ;;
57 *)
58 usage 1 1>&2
59 ;;
60 esac
61 shift
62 done
63
64 if test "$echo_prefix" = "yes"; then
65 echo $prefix
66 fi
67
68 if test "$echo_exec_prefix" = "yes"; then
69 echo $exec_prefix
70 fi
71
72 if test "$echo_cflags" = "yes"; then
73 echo -I${prefix}/include $dw_cflags
74 fi
75
76 if test "$echo_libs" = "yes"; then
77 echo -L${prefix}/lib $dw_libs
78 fi
79