beta-0.89.2
[luatex.git] / source / libs / libpng / libpng-src / scripts / libpng-config-body.in
blobb466432d54642032a192cee519fc15e35022ff4c
2 usage()
4     cat <<EOF
5 Usage: libpng-config [OPTION] ...
7 Known values for OPTION are:
9   --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
23 EOF
25     exit $1
28 if test $# -eq 0; then
29     usage 1
32 while test $# -gt 0; do
33     case "$1" in
35     --prefix)
36         echo ${prefix}
37         ;;
39     --version)
40         echo ${version}
41         exit 0
42         ;;
44     --help)
45         usage 0
46         ;;
48     --ccopts)
49         echo ${ccopts}
50         ;;
52     --cppflags)
53         echo ${cppflags}
54         ;;
56     --cflags)
57         echo ${I_opts} ${cppflags} ${ccopts}
58         ;;
60     --libdir)
61         echo ${libdir}
62         ;;
64     --libs)
65         echo ${libs}
66         ;;
68     --I_opts)
69         echo ${I_opts}
70         ;;
72     --L_opts)
73         echo ${L_opts}
74         ;;
76     --R_opts)
77         echo ${R_opts}
78         ;;
80     --ldflags)
81         echo ${ldflags} ${L_opts} ${R_opts} ${libs}
82         ;;
84     --static)
85         R_opts=""
86         ;;
88     *)
89         usage
90         exit 1
91         ;;
92     esac
93     shift
94 done
96 exit 0