/[mcrypt]/libmcrypt/lib/libmcrypt-config.in
ViewVC logotype

Contents of /libmcrypt/lib/libmcrypt-config.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed May 16 08:55:12 2001 UTC (19 years, 11 months ago) by nmav
Branch: MAIN
CVS Tags: libmcrypt_2_4_15, libmcrypt_2_4_16, mcrypt_2_4_20, mcrypt_2_4_12, libmcrypt_2_4_16b, libmcrypt_2_5_3, libmcrypt_2_5_2, libmcrypt_2_5_0, libmcrypt_2_5_7, libmcrypt_2_5_6, libmcrypt_2_5_5, libmcrypt_2_5_4, libmcrypt_2_4_17, libmcrypt_2_5_5rc1, libmcrypt_2_4_21, mcrypt_2_4_13, HEAD
added libmcrypt-config so programs that use libmcrypt can be configured
easier

1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6
7 mcrypt_libs="@LIBMCRYPT_LIBS@"
8 mcrypt_cflags="@LIBMCRYPT_CFLAGS@"
9
10
11 usage()
12 {
13 cat <<EOF
14 Usage: libmcrypt-config [OPTIONS]
15 Options:
16 [--prefix[=DIR]]
17 [--exec-prefix[=DIR]]
18 [--version]
19 [--libs]
20 [--cflags]
21 EOF
22 exit $1
23 }
24
25 if test $# -eq 0; then
26 usage 1 1>&2
27 fi
28
29 while test $# -gt 0; do
30 case "$1" in
31 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
32 *) optarg= ;;
33 esac
34
35 case $1 in
36 --prefix=*)
37 prefix=$optarg
38 if test $exec_prefix_set = no ; then
39 exec_prefix=$optarg
40 fi
41 ;;
42 --prefix)
43 echo_prefix=yes
44 ;;
45 --exec-prefix=*)
46 exec_prefix=$optarg
47 exec_prefix_set=yes
48 ;;
49 --exec-prefix)
50 echo_exec_prefix=yes
51 ;;
52 --version)
53 echo "@VERSION@"
54 exit 0
55 ;;
56 --cflags)
57 echo_cflags=yes
58 ;;
59 --libs)
60 echo_libs=yes
61 ;;
62 *)
63 usage 1 1>&2
64 ;;
65 esac
66 shift
67 done
68
69 if test "$echo_prefix" = "yes"; then
70 echo $prefix
71 fi
72
73 if test "$echo_exec_prefix" = "yes"; then
74 echo $exec_prefix
75 fi
76
77 if test "$echo_cflags" = "yes"; then
78 if test "@includedir@" != "/usr/include" ; then
79 includes="-I@includedir@"
80 for i in $mcrypt_cflags ; do
81 if test "$i" = "-I@includedir@" ; then
82 includes=""
83 fi
84 done
85 fi
86 echo $includes $mcrypt_cflags
87 fi
88
89 if test "$echo_libs" = "yes"; then
90 echo ${mcrypt_libs}
91 fi
92
93

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26