]> git.evergreen-ils.org Git - OpenSRF.git/blob - bin/osrf_config.in
430888fb55954df7497485321de1ae74cbbf1dc9
[OpenSRF.git] / bin / osrf_config.in
1 #!/bin/sh
2 #
3 # Copyright (C) 2008 Equinox Software, Inc.
4 # Kevin Beswick <kevinbeswick00@gmail.com>
5 # Copyright (C) 2010 Laurentian University
6 # Dan Scott <dscott@laurentian.ca>
7 #
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18
19 # Shows configuration options of OpenSRF
20
21 prefix=@prefix@
22 exec_prefix=@exec_prefix@
23 datarootdir=@datarootdir@
24
25 showInstalled() {
26     JAVA=@OSRF_INSTALL_JAVA@
27     if test "$JAVA" = "true"; then
28         echo "OSRF_JAVA"
29     fi
30 }
31
32 showAll() {
33     echo @PACKAGE_STRING@
34     echo PREFIX=@prefix@
35     echo BINDIR=@bindir@
36     echo LIBDIR=@libdir@
37     echo TMP=@TMP@
38     echo INCLUDEDIR=@includedir@
39     echo SYSCONFDIR=@sysconfdir@
40     echo APXS2=@APXS2@
41     echo APACHE2_HEADERS=@APACHE2_HEADERS@
42     echo APR_HEADERS=@APR_HEADERS@
43     echo LIBXML2_HEADERS=@LIBXML2_HEADERS@
44     echo
45     echo "Installed modules:"
46     showInstalled;
47 }
48
49 showHelp() {
50     echo
51     echo "------------------------------------------------------------"
52     echo " osrf_config                                                "
53     echo " Display the configuration options for this OpenSRF install "
54     echo "------------------------------------------------------------"
55     echo
56     echo "Usage: osrf_config [--option]"
57     echo
58     echo "Options: "
59     echo
60     echo "--help                  displays help"
61     echo "--version               displays version number of OpenSRF"
62     echo "--installed             displays options that were chosen at install time"
63     echo
64     echo "--apache                displays location of Apache headers"
65     echo "--apr                   displays location of Apache portable runtime headers"
66     echo "--apxs                  displays location of Apache extension tool"
67     echo "--bindir                displays location of binary executables"
68     echo "--includedir            displays location of header files"
69     echo "--libdir                displays location of libraries"
70     echo "--libxml                displays location of libxml2 headers"
71     echo "--localstatedir         displays location of state information"
72     echo "--prefix                displays install prefix"
73     echo "--sysconfdir            displays location of configuration files"
74     echo "--tmp                   displays location of temporary files"
75     echo
76 }
77
78 case "$1" in
79     --installed)
80         showInstalled
81         ;;
82     --cconfig) cconfig;
83              ;;
84     --libxml)
85         echo @LIBXML2_HEADERS@
86         ;;
87     --apr)
88         echo @APR_HEADERS@
89         ;;
90     --apache)
91         echo @APACHE2_HEADERS@
92         ;;
93     --prefix)
94         echo @prefix@
95         ;;
96     --version)
97         echo @PACKAGE_STRING@
98         ;;
99     --bindir)
100         echo @bindir@
101         ;;
102     --libdir)
103         echo @libdir@
104         ;;
105     --sysconfdir)
106         echo @sysconfdir@
107         ;;
108     --localstatedir)
109         echo @localstatedir@
110         ;;
111     --tmpdir)
112         echo @TMP@
113         ;;
114     --apxs)
115         echo @APXS2@
116         ;;
117     --includedir)
118         echo @includedir@
119         ;;
120     --docdir)
121         echo @docdir@
122         ;;
123     --help)
124         showHelp
125         ;;
126     *)
127         showAll
128         ;;
129 esac