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