* src/libopensrf/Makefile.am:
* Fix typo for -I (includes) vs. -L (linking libraries) compile option
* src/Makefile.am:
* Propagate NDEBUG compile flag to all other makefiles
* Create target directories
* Set directories in example config files to match configured options
* configure.ac:
* Set default prefix to /opensrf/ instead of /openils/
* bin/osrf_config.in:
* Add --localstatedir option for osrf_config
* Correct output value for --apxs
* bin/osrf_ctl.sh
* Set default PID dir to localstatedir rather than sysconfdir
* Makefile.am:
* Propagate NDEBUG compile flag to all other makefiles
* Remove explicit rpath option, automake will figure that out for us (supposedly)
* examples/opensrf_core.xml.example, examples/opensrf.xml.example, examples/srfsh.xml.example:
* Set directories in example config files to match configured options
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1349
9efc2488-bf62-4759-914b-
345cdb29e865
# GNU General Public License for more details.
+if !DEBUG
+MAYBE_DEBUG = -DNDEBUG
+endif
+
export PREFIX = @prefix@
export TMP = @TMP@
export LIBXML2_HEADERS = @LIBXML2_HEADERS@
export ETCDIR = @sysconfdir@
export APXS2 = @APXS2@
export APACHE2_HEADERS = @APACHE2_HEADERS@
-export DEF_CFLAGS = -D_LARGEFILE64_SOURCE -pipe -g -Wall -O2 -fPIC -I@abs_top_builddir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) @INCLUDES@
-export DEF_LDFLAGS = -Wl, -rpath=$(LIBDIR) -L$(TMPDIR) @LIBDIRS@
+export DEF_CFLAGS = -D_LARGEFILE64_SOURCE $(MAYBE_DEBUG) -pipe -g -Wall -O2 -fPIC -I@abs_top_builddir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) @INCLUDES@
+export DEF_LDFLAGS = -L$(TMPDIR) @LIBDIRS@
export DEF_LDLIBS = -lobjson -lopensrf
+export VAR = @localstatedir@
export PID = @localstatedir@/run/opensrf
export SOCK = @localstatedir@/lock/opensrf
export LOG = @localstatedir@/log/opensrf
--sysconfdir)
echo @sysconfdir@;
;;
+ --localstatedir)
+ echo @localstatedir@;
+ ;;
--tmpdir)
echo @TMP@;
;;
--apxs)
- echo @APXS@;
+ echo @APXS2@;
;;
--includedir)
echo @includedir@;
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-
+
OPT_ACTION=""
OPT_CONFIG=""
echo "Please specify the location of the opensrf_core.xml file using the -c flag";
exit 1;
fi;
-[ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=`$OSRF_CONFIG --sysconfdir`/run;
+[ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=`$OSRF_CONFIG --localstatedir`/run;
[ -z "$OPT_ACTION" ] && usage;
PID_ROUTER="$OPT_PID_DIR/router.pid";
AM_INIT_AUTOMAKE([OpenSRF], [trunk])
AC_REVISION($Revision: 0.1 $)
AC_CONFIG_SRCDIR([configure.ac])
-AC_PREFIX_DEFAULT([/openils/])
+AC_PREFIX_DEFAULT([/opensrf/])
AC_SUBST(prefix)
<dirs>
<!-- opensrf log files go in this directory -->
- <log>/path/to/log</log>
+ <log>LOCALSTATEDIR/log</log>
<!-- opensrf unix domaind socket files go here -->
- <sock>/path/to/sock</sock>
+ <sock>LOCALSTATEDIR/lock</sock>
<!-- opensrf pids go here -->
- <pid>/path/to/pid</pid>
+ <pid>LOCALSTATEDIR/run</pid>
<!-- global config directory -->
- <conf>/path/to/conf</conf>
+ <conf>SYSCONFDIR</conf>
</dirs>
<!-- prefork, simple. prefork is suggested -->
<port>5222</port>
<!-- log to a local file -->
- <logfile>/openils/var/log/osrfsys.log</logfile>
+ <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
<!-- Log to syslog. You can use this same layout for
defining the logging of all services in this file -->
<loglevel>3</loglevel>
<!-- config file for the services -->
- <settings_config>/openils/conf/opensrf.xml</settings_config>
+ <settings_config>SYSCONFDIR/opensrf.xml</settings_config>
</opensrf>
<secret>secret</secret>
<listen_address>10.0.0.3</listen_address>
<loglevel>3</loglevel>
- <logfile>/openils/var/log/osrfsys.log</logfile>
+ <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
</chopchop>
<!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
<username>mylogin</username>
<passwd>mypassword</passwd>
<port>5222</port>
- <logfile>/openils/var/log/gateway.log</logfile>
+ <logfile>LOCALSTATEDIR/log/gateway.log</logfile>
<loglevel>3</loglevel>
</gateway>
<max_reconnect_attempts>5</max_reconnect_attempts>
</transport>
- <logfile>/openils/var/log/router.log</logfile>
+ <logfile>LOCALSTATEDIR/log/router.log</logfile>
<loglevel>2</loglevel>
</router>
<username>myusername</username>
<passwd>mypassword</passwd>
<port>5222</port>
- <logfile>/path/to/log/srfsh.log</logfile>
+ <logfile>LOCALSTATEDIR/log/srfsh.log</logfile>
<loglevel>4</loglevel>
</srfsh>
export INCLUDEDIR= @includedir@
export OSRF_JAVA_DEPSDIR = @OSRF_JAVA_DEPSDIR@
+
+
AM_LDFLAGS = $(DEF_LDFLAGS)
AM_CFLAGS = $(DEF_CFLAGS)
-if DEBUG
-AM_CFLAGS += -DNDEBUG
-endif
-
if BUILDJSON
LDADD = -lobjson
BJSON=1
SUBDIRS = libopensrf c-apps router srfsh jserver gateway $(MAYBE_PY) $(MAYBE_JA)
install-data-local:
+ mkdir -p $(VAR)
+ mkdir -p $(PID)
+ mkdir -p $(LOG)
+ mkdir -p $(SOCK)
mkdir -p $(JSDIR)
mkdir -p $(PERLDIR)
mkdir -p $(ETCDIR)
mv $(BINDIR)/opensrf $(BINDIR)/opensrf-c
cp ../bin/osrf_config $(BINDIR)
cp ../bin/osrf_ctl.sh $(BINDIR)
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '../examples/opensrf.xml.example'
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '../examples/opensrf.xml.example'
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '../examples/opensrf_core.xml.example'
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '../examples/opensrf_core.xml.example'
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '../examples/srfsh.xml.example'
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '../examples/srfsh.xml.example'
cp ../examples/opensrf.xml.example $(ETCDIR)
cp ../examples/opensrf_core.xml.example $(ETCDIR)
cp ../examples/srfsh.xml.example $(ETCDIR)
# GNU General Public License for more details.
-AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing -I./.libs/ -DOSRF_JSON_ENABLE_XML_UTILS
+AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing -L./.libs/ -DOSRF_JSON_ENABLE_XML_UTILS
AM_LDFLAGS = $(DEF_LDFLAGS)
LDADD = -lxml2 -ldl -lmemcache -lopensrf -lobjson