]> git.evergreen-ils.org Git - OpenSRF.git/blob - bin/osrf_config.in
Fix unit tests for Python in a twistd instance
[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     PYTHON=@OSRF_INSTALL_PYTHON@
28     if test "$JAVA" = "true"; then
29         echo "OSRF_JAVA"
30     fi
31     if test "$PYTHON" = "true"; then
32         echo "OSRF_PYTHON"
33     fi
34 }
35
36 showAll() {
37     echo @PACKAGE_STRING@
38     echo PREFIX=@prefix@
39     echo BINDIR=@bindir@
40     echo LIBDIR=@libdir@
41     echo TMP=@TMP@
42     echo INCLUDEDIR=@includedir@
43     echo SYSCONFDIR=@sysconfdir@
44     echo APXS2=@APXS2@
45     echo APACHE2_HEADERS=@APACHE2_HEADERS@
46     echo APR_HEADERS=@APR_HEADERS@
47     echo LIBXML2_HEADERS=@LIBXML2_HEADERS@
48     echo
49     echo "Installed modules:"
50     showInstalled;
51 }
52
53 showHelp() {
54     echo
55     echo "------------------------------------------------------------"
56     echo " osrf_config                                                "
57     echo " Display the configuration options for this OpenSRF install "
58     echo "------------------------------------------------------------"
59     echo
60     echo "Usage: osrf_config [--option]"
61     echo
62     echo "Options: "
63     echo
64     echo "--help                  displays help"
65     echo "--version               displays version number of OpenSRF"
66     echo "--installed             displays options that were chosen at install time"
67     echo
68     echo "--apache                displays location of Apache headers"
69     echo "--apr                   displays location of Apache portable runtime headers"
70     echo "--apxs                  displays location of Apache extension tool"
71     echo "--bindir                displays location of binary executables"
72     echo "--includedir            displays location of header files"
73     echo "--libdir                displays location of libraries"
74     echo "--libxml                displays location of libxml2 headers"
75     echo "--localstatedir         displays location of state information"
76     echo "--prefix                displays install prefix"
77     echo "--sysconfdir            displays location of configuration files"
78     echo "--tmp                   displays location of temporary files"
79     echo
80 }
81
82 case "$1" in
83     --installed)
84         showInstalled
85         ;;
86     --cconfig) cconfig;
87              ;;
88     --libxml)
89         echo @LIBXML2_HEADERS@
90         ;;
91     --apr)
92         echo @APR_HEADERS@
93         ;;
94     --apache)
95         echo @APACHE2_HEADERS@
96         ;;
97     --prefix)
98         echo @prefix@
99         ;;
100     --version)
101         echo @PACKAGE_STRING@
102         ;;
103     --bindir)
104         echo @bindir@
105         ;;
106     --libdir)
107         echo @libdir@
108         ;;
109     --sysconfdir)
110         echo @sysconfdir@
111         ;;
112     --localstatedir)
113         echo @localstatedir@
114         ;;
115     --tmpdir)
116         echo @TMP@
117         ;;
118     --apxs)
119         echo @APXS2@
120         ;;
121     --includedir)
122         echo @includedir@
123         ;;
124     --docdir)
125         echo @docdir@
126         ;;
127     --help)
128         showHelp
129         ;;
130     *)
131         showAll
132         ;;
133 esac