]> git.evergreen-ils.org Git - OpenSRF.git/blob - bin/osrf_config.in
Patch from Scott McKellar:
[OpenSRF.git] / bin / osrf_config.in
1 # Copyright (C) 2008 Equinox Software, Inc.
2 # Kevin Beswick <kevinbeswick00@gmail.com>
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14
15 # Shows configuration options of OSRF
16
17 prefix=@prefix@
18 exec_prefix=@prefix@
19 datarootdir=@datarootdir@
20
21 function showInstalled {
22          JAVA=@OSRF_INSTALL_JAVA@
23          PYTHON=@OSRF_INSTALL_PYTHON@
24          if test "$JAVA" = "true"; then
25             echo "OSRF_JAVA"
26          fi
27          if test "$PYTHON" = "true"; then
28             echo "OSRF_PYTHON"
29          fi
30 }
31
32 function 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 function showHelp {
50          echo 
51          echo "------------------------------------------------------------"
52          echo " osrf_config                                                "
53          echo " Shows configuration of opensrf                             "
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 osrf"
62          echo "--installed             displays options that were installed"
63          echo "--prefix                displays prefix"
64          echo "--bindir                displays bindir"
65          echo "--libdir                displays libdir"
66          echo "--tmp                   displays tmp"
67          echo "--includedir            displays includedir"
68          echo "--sysconfdir            displays sysconfdir"
69          echo "--apxs                  displays location of apxs"
70          echo "--apache                displays location of apache2 headers"
71          echo "--apr                   displays location of apr headers"
72          echo "--libxml                displays location of libxml2 headers" 
73          echo
74 }
75
76 case "$1" in
77      --installed)
78                 showInstalled;
79                 ;;
80      --cconfig) cconfig;
81                 ;;
82      --libxml)
83                 echo @LIBXML2_HEADERS@;
84                 ;;
85      --apr)
86                 echo @APR_HEADERS@;
87                 ;;
88      --apache)
89                 echo @APACHE2_HEADERS@;
90                 ;;
91      --prefix)
92                 echo @prefix@
93                 ;;
94      --version) 
95                 echo @PACKAGE_STRING@;
96                 ;;
97      --bindir)
98                 echo @bindir@
99                 ;;
100      --libdir)
101                 echo @libdir@;
102                 ;;
103      --sysconfdir)
104                 echo @sysconfdir@;
105                 ;;
106      --localstatedir)
107                 echo @localstatedir@;
108                 ;;
109      --tmpdir)
110                 echo @TMP@;
111                 ;;
112      --apxs)
113                 echo @APXS2@;
114                 ;;
115      --includedir)
116                 echo @includedir@;
117                 ;;
118      --docdir)
119                 echo @docdir@;
120                 ;;
121      --help)
122                 showHelp;
123                 ;;
124      *)
125                 showAll;
126                 ;;
127 esac