blob: b466432d54642032a192cee519fc15e35022ff4c [file] [log] [blame]
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -05001
2usage()
3{
4 cat <<EOF
5Usage: libpng-config [OPTION] ...
6
7Known values for OPTION are:
8
Glenn Randers-Pehrson5ff38d32002-09-17 23:38:46 -05009 --prefix print libpng prefix
10 --libdir print path to directory containing library
11 --libs print library linking information
12 --ccopts print compiler options
13 --cppflags print pre-processor flags
14 --cflags print preprocessor flags, I_opts, and compiler options
15 --I_opts print "-I" include options
16 --L_opts print linker "-L" flags for dynamic linking
17 --R_opts print dynamic linker "-R" or "-rpath" flags
18 --ldopts print linker options
19 --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
20 --static revise subsequent outputs for static linking
21 --help print this help and exit
22 --version print version information
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -050023EOF
24
25 exit $1
26}
27
28if test $# -eq 0; then
29 usage 1
30fi
31
32while test $# -gt 0; do
33 case "$1" in
34
35 --prefix)
36 echo ${prefix}
37 ;;
38
39 --version)
40 echo ${version}
41 exit 0
42 ;;
43
44 --help)
45 usage 0
46 ;;
47
Glenn Randers-Pehrson5ff38d32002-09-17 23:38:46 -050048 --ccopts)
49 echo ${ccopts}
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -050050 ;;
51
52 --cppflags)
53 echo ${cppflags}
54 ;;
55
Glenn Randers-Pehrson5ff38d32002-09-17 23:38:46 -050056 --cflags)
57 echo ${I_opts} ${cppflags} ${ccopts}
58 ;;
59
60 --libdir)
61 echo ${libdir}
62 ;;
63
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -050064 --libs)
65 echo ${libs}
66 ;;
67
Glenn Randers-Pehrson5ff38d32002-09-17 23:38:46 -050068 --I_opts)
69 echo ${I_opts}
70 ;;
71
72 --L_opts)
73 echo ${L_opts}
74 ;;
75
76 --R_opts)
77 echo ${R_opts}
Glenn Randers-Pehrson2ae022d2002-07-01 22:23:46 -050078 ;;
79
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -050080 --ldflags)
Glenn Randers-Pehrson5ff38d32002-09-17 23:38:46 -050081 echo ${ldflags} ${L_opts} ${R_opts} ${libs}
82 ;;
83
84 --static)
85 R_opts=""
Glenn Randers-Pehrson837a3d12002-05-10 20:19:58 -050086 ;;
87
88 *)
89 usage
90 exit 1
91 ;;
92 esac
93 shift
94done
95
96exit 0