]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/extras/eg_config.in
stringify the copy location list before making it a param
[Evergreen.git] / Open-ILS / src / extras / eg_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 Evergreen
16
17 prefix=@prefix@
18 exec_prefix=@prefix@
19 datarootdir=@datarootdir@
20
21 function showInstalled {
22         if test "@BUILDILSCORE_TRUE@" = ""; then
23                 echo "EG_CORE"
24         fi
25         if test "@BUILDILSWEB_TRUE@" = ""; then
26                 echo "EG_WEB"
27         fi
28         if test "@BUILDILSREPORTER_TRUE@" = ""; then
29                 echo "EG_REPORTER"
30         fi
31         if test "@BUILDILSCLIENT_TRUE@" = ""; then
32                 echo "EG_CLIENT"
33         fi
34         if test "@BUILDEGJAVA_TRUE@" = ""; then
35                 echo "EG_JAVA"
36         fi
37         if test "@BUILDEGPYTHON_TRUE@" = ""; then
38                 echo "EG_PYTHON"
39         fi
40
41
42 }
43
44 function showAll {
45          echo @PACKAGE_STRING@  
46          echo PREFIX=@prefix@
47          echo BINDIR=@bindir@
48          echo LIBDIR=@libdir@
49          echo TMP=@TMP@
50          echo INCLUDEDIR=@includedir@
51          echo SYSCONFDIR=@sysconfdir@
52          echo APXS2=@APXS2@
53          echo APACHE2_HEADERS=@APACHE2_HEADERS@
54          echo APR_HEADERS=@APR_HEADERS@
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 "--apache                displays location of apache2 headers"
84          echo "--apr                   displays location of apr headers"
85          echo "--libxml                displays location of libxml2 headers" 
86          echo
87 }
88
89 case "$1" in
90      --installed)
91                 showInstalled;
92                 ;;
93      --cconfig) cconfig;
94                 ;;
95      --libxml)
96                 echo @LIBXML2_HEADERS@;
97                 ;;
98      --apr)
99                 echo @APR_HEADERS@;
100                 ;;
101      --apache)
102                 echo @APACHE2_HEADERS@;
103                 ;;
104      --prefix)
105                 echo @prefix@
106                 ;;
107      --version) 
108                 echo @PACKAGE_STRING@;
109                 ;;
110      --bindir)
111                 echo @bindir@
112                 ;;
113      --libdir)
114                 echo @libdir@;
115                 ;;
116      --sysconfdir)
117                 echo @sysconfdir@;
118                 ;;
119      --localstatedir)
120                 echo @localstatedir@;
121                 ;;
122      --tmpdir)
123                 echo @TMP@;
124                 ;;
125      --apxs)
126                 echo @APXS2@;
127                 ;;
128      --includedir)
129                 echo @includedir@;
130                 ;;
131      --docdir)
132                 echo @docdir@;
133                 ;;
134      --help)
135                 showHelp;
136                 ;;
137      *)
138                 showAll;
139                 ;;
140 esac