From: dbs Date: Fri, 29 Jan 2010 02:51:11 +0000 (+0000) Subject: Apply one more portability patch from Dan McMahill X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=98dd63d3a01b185e4b71aea8cb401e1fc91a32d8;p=OpenSRF.git Apply one more portability patch from Dan McMahill patch-ae -- $$(command) is ok with bash and ksh but is not portable to all /bin/sh implementations. Also instead of hard coding "apxs2" use the APXS2 variable which was set during the configure process. This is especially helpful when the binary is installed as apxs instead of apxs2. Finally, remove the DEF_LDLIBS from the apxs2 compilation/link line. As near as I can tell this only removed -lopensrf which is ok because we already had libopensrf.so explicitly listed. Including -lopensrf didn't work correctly since libopensrf had been built but not yet installed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Dan McMahill git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_2@1908 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/Makefile.am b/src/gateway/Makefile.am index 2446501..9f2f732 100644 --- a/src/gateway/Makefile.am +++ b/src/gateway/Makefile.am @@ -18,12 +18,13 @@ AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_ AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf install-exec-local: - if [ ! "$$(grep mod_placeholder `$(APXS2) -q SYSCONFDIR`/httpd.conf)" ]; \ + d=`$(APXS2) -q SYSCONFDIR` && \ + if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \ then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \ - >> `$(APXS2) -q SYSCONFDIR`/httpd.conf; \ + >> $${d}/httpd.conf; \ fi - $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so - $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so + $(APXS2) -c $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so + $(APXS2) -c $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so $(APXS2) -i -a @srcdir@/osrf_json_gateway.la $(APXS2) -i -a @srcdir@/osrf_http_translator.la