]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/extras/eg_config.in
Fedora needs Locale::Maketext::Lexicon too
[working/Evergreen.git] / Open-ILS / src / extras / eg_config.in
1 #!/bin/bash
2 #
3 # Copyright (C) 2008 Equinox Software, Inc.
4 # Kevin Beswick <kevinbeswick00@gmail.com>
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16
17 # Shows configuration options of Evergreen
18
19 prefix=@prefix@
20 exec_prefix=@prefix@
21 datarootdir=@datarootdir@
22
23 function showInstalled {
24         if test "@BUILDILSCORE_TRUE@" = ""; then
25                 echo "EG_CORE"
26         fi
27         if test "@BUILDILSWEB_TRUE@" = ""; then
28                 echo "EG_WEB"
29         fi
30         if test "@BUILDILSREPORTER_TRUE@" = ""; then
31                 echo "EG_REPORTER"
32         fi
33         if test "@BUILDILSCLIENT_TRUE@" = ""; then
34                 echo "EG_CLIENT"
35         fi
36         if test "@BUILDEGJAVA_TRUE@" = ""; then
37                 echo "EG_JAVA"
38         fi
39         if test "@BUILDEGPYTHON_TRUE@" = ""; then
40                 echo "EG_PYTHON"
41         fi
42
43
44 }
45
46 function showAll {
47          echo @PACKAGE_STRING@  
48          echo PREFIX=@prefix@
49          echo BINDIR=@bindir@
50          echo LIBDIR=@libdir@
51          echo TMP=@TMP@
52          echo INCLUDEDIR=@includedir@
53          echo SYSCONFDIR=@sysconfdir@
54          echo APXS2=@APXS2@
55          echo LIBXML2_HEADERS=@LIBXML2_HEADERS@
56          echo 
57          echo "Installed modules:"
58          showInstalled;
59 }
60
61
62 function showHelp {
63          echo 
64          echo "------------------------------------------------------------"
65          echo " eg_config                                                  "
66          echo " Shows configuration of evergreen                           "
67          echo "------------------------------------------------------------"
68          echo
69          echo "Usage: eg_config [--option]"
70          echo 
71          echo "Options: "
72          echo
73          echo "--help                  displays help"
74          echo "--version               displays version number of evergreen"
75          echo "--installed             displays options that were installed"
76          echo "--prefix                displays prefix"
77          echo "--bindir                displays bindir"
78          echo "--libdir                displays libdir"
79          echo "--tmp                   displays tmp"
80          echo "--includedir            displays includedir"
81          echo "--sysconfdir            displays sysconfdir"
82          echo "--apxs                  displays location of apxs"
83          echo "--libxml                displays location of libxml2 headers" 
84          echo
85 }
86
87 case "$1" in
88      --installed)
89                 showInstalled;
90                 ;;
91      --cconfig) cconfig;
92                 ;;
93      --libxml)
94                 echo @LIBXML2_HEADERS@;
95                 ;;
96      --apr)
97                 echo @APR_HEADERS@;
98                 ;;
99      --apache)
100                 echo @APACHE2_HEADERS@;
101                 ;;
102      --prefix)
103                 echo @prefix@
104                 ;;
105      --version) 
106                 echo @PACKAGE_STRING@;
107                 ;;
108      --bindir)
109                 echo @bindir@
110                 ;;
111      --libdir)
112                 echo @libdir@;
113                 ;;
114      --sysconfdir)
115                 echo @sysconfdir@;
116                 ;;
117      --localstatedir)
118                 echo @localstatedir@;
119                 ;;
120      --tmpdir)
121                 echo @TMP@;
122                 ;;
123      --apxs)
124                 echo @APXS2@;
125                 ;;
126      --includedir)
127                 echo @includedir@;
128                 ;;
129      --docdir)
130                 echo @docdir@;
131                 ;;
132      --help)
133                 showHelp;
134                 ;;
135      *)
136                 showAll;
137                 ;;
138 esac