[Freeswitch-svn] [commit] r7663 - in freeswitch/trunk: . build libs/curl/lib libs/js/nsprpub/config libs/xmlrpc-c src src/mod/asr_tts/mod_openmrcp src/mod/endpoints/mod_sofia src/mod/languages/mod_spidermonkey

Freeswitch SVN cypromis at freeswitch.org
Mon Feb 18 09:58:42 EST 2008


Author: cypromis
Date: Mon Feb 18 09:58:41 2008
New Revision: 7663

Modified:
   freeswitch/trunk/Makefile.am
   freeswitch/trunk/build/modmake.rules.in
   freeswitch/trunk/configure.in
   freeswitch/trunk/libs/curl/lib/config.h.in
   freeswitch/trunk/libs/js/nsprpub/config/rules.mk
   freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in
   freeswitch/trunk/src/Makefile.am
   freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/Makefile
   freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile

Log:
Make libdir and bindir being accepted by libs and modules
add a setting called --modinstdir to be able to define where modules get installed


Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am	(original)
+++ freeswitch/trunk/Makefile.am	Mon Feb 18 09:58:41 2008
@@ -31,6 +31,9 @@
 moh: sounds-music-8000
 moh-install: sounds-music-8000-install
 
+libdir = @libdir@
+bindir = @bindir@
+includedir = @includedir@
 libfreeswitch_la_SOURCES	= \
 src/switch_apr.c \
 src/switch_buffer.c \
@@ -198,6 +201,7 @@
 	@for x in mod db log log/xml_cdr bin scripts grammar recordings ; do \
 		$(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \
 	 done
+	$(mkinstalldirs) $(DESTDIR)@modinstdir@
 	test -d $(DESTDIR)$(prefix)/conf || $(MAKE) samples-conf
 	test -d $(DESTDIR)$(prefix)/htdocs || $(MAKE) samples-htdocs
 
@@ -334,10 +338,10 @@
 
 scripts/fsxs: scripts/fsxs.in
 	@echo creating fsxs
-	@sed -e "s, at MODULES_DIR\@,$(PREFIX)/mod," \
-	    -e "s, at LIB_DIR\@,$(PREFIX)/lib," \
-	    -e "s, at BIN_DIR\@,$(PREFIX)/bin," \
-	    -e "s, at INC_DIR\@,$(PREFIX)/include," \
+	@sed -e "s, at MODULES_DIR\@, at modinstdir@," \
+	    -e "s, at LIB_DIR\@, at libdir@," \
+	    -e "s, at BIN_DIR\@, at bindir@," \
+	    -e "s, at INC_DIR\@, at includedir@," \
 	    -e "s, at CFG_DIR\@,$(PREFIX)/conf," \
 	    -e "s, at DB_DIR\@,$(PREFIX)/db," \
 	    -e "s, at PREFIX\@,$(PREFIX)," \
@@ -365,7 +369,7 @@
 	rm -f `find ./libs -name \*.la`
 
 libclean:
-	@for file in `ls ./libs`; do pushd "./libs/"$$file; make clean; popd; done
+	@for file in `ls ./libs`; do pushd "./libs/"$$file; make clean; rm -f .built; popd; done
 
 modules.conf:
 	if test -f $@; then touch $@; else cp build/modules.conf.in $@ ;fi

Modified: freeswitch/trunk/build/modmake.rules.in
==============================================================================
--- freeswitch/trunk/build/modmake.rules.in	(original)
+++ freeswitch/trunk/build/modmake.rules.in	Mon Feb 18 09:58:41 2008
@@ -24,9 +24,10 @@
 LIBS=$(switch_builddir)/libfreeswitch.la
 DEFS=@DEFS@
 PREFIX = @prefix@
+MODINSTDIR = @modinstdir@
 
-DYLD_LIBRARY_PATH=$(PREFIX)/lib:$DYLD_LIBRARY_PATH
-LD_LIBRARY_PATH=$(PREFIX)/lib:$LD_LIBRARY_PATH
+DYLD_LIBRARY_PATH=${_libdir}:$DYLD_LIBRARY_PATH
+LD_LIBRARY_PATH=${_libdir}:$LD_LIBRARY_PATH
 OSARCH=`uname -s`
 DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
 SOLINK = @SOLINK@
@@ -119,14 +120,14 @@
 mod_clean:
 	@rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *.lo *~ .libs $(LOCAL_OBJS)
 
-mod_install: $(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
+mod_install: $(DESTDIR)$(MODINSTDIR)/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
 
-$(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN):$(MODNAME).$(DYNAMIC_LIB_EXTEN)
+$(DESTDIR)$(MODINSTDIR)/$(MODNAME).$(DYNAMIC_LIB_EXTEN):$(MODNAME).$(DYNAMIC_LIB_EXTEN)
 	@echo installing $<
-	@$(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod >/dev/null
+	@$(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(MODINSTDIR) >/dev/null
 
 mod_uninstall:
-	@$(LTUNINSTALL) $(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
+	@$(LTUNINSTALL) $(DESTDIR)$(MODINSTDIR)/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
 
 # define these in your makefile if you wish
 local_all local_depend local_clean depend_install local_install local_distclean local_extraclean local_uninstall:

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Mon Feb 18 09:58:41 2008
@@ -30,8 +30,11 @@
 AC_SUBST(switch_srcdir)
 AC_SUBST(switch_builddir)
 
-moddir=$prefix/mod
-AC_SUBST(moddir)
+# Where to install the modules
+AC_ARG_WITH(modinstdir, [   --with-modinstdir (default=$prefix/mod)], modinstdir=$withval, modinstdir="${prefix}/mod")
+
+AC_SUBST(modinstdir)
+AC_DEFINE_UNQUOTED([SWITCH_MOD_DIR],"${modinstdir}",[where to install the modules to])
 
 #Set default language
 AC_LANG_C
@@ -66,7 +69,7 @@
 # Optional Features
 
 AC_ARG_ENABLE(resample,
-[AC_HELP_STRING([--enable-resample],[build with embedded resamper])],[enable_resample="$enable_resample"],[enable_resample="yes"])
+[AC_HELP_STRING([--enable-resample],[build with embedded resampler])],[enable_resample="$enable_resample"],[enable_resample="yes"])
 
 # We should add checking for out of tree libresample here
 RESAMPLE_LIB=
@@ -383,6 +386,9 @@
 AC_SUBST(uint64_t_fmt) 
 AC_SUBST(ssize_t_fmt) 
 AC_SUBST(size_t_fmt)
+AC_SUBST(libdir)
+AC_SUBST(bindir)
+AC_SUBST(includedir)
 
 AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat)
 AC_PATH_PROGS(TAR, gtar tar)
@@ -476,7 +482,7 @@
 AC_CONFIG_SUBDIRS(libs/speex)
 AC_CONFIG_SUBDIRS(libs/xmlrpc-c)
 AC_CONFIG_SUBDIRS(libs/portaudio)
-#AC_CONFIG_SUBDIRS(libs/openmrcp)
+AC_CONFIG_SUBDIRS(libs/openmrcp)
 AC_CONFIG_SUBDIRS(libs/openzap)
 
 AC_OUTPUT

Modified: freeswitch/trunk/libs/curl/lib/config.h.in
==============================================================================
--- freeswitch/trunk/libs/curl/lib/config.h.in	(original)
+++ freeswitch/trunk/libs/curl/lib/config.h.in	Mon Feb 18 09:58:41 2008
@@ -621,16 +621,16 @@
 /* Define to the function return type for send. */
 #undef SEND_TYPE_RETV
 
-/* The size of a `curl_off_t', as computed by sizeof. */
+/* The size of `curl_off_t', as computed by sizeof. */
 #undef SIZEOF_CURL_OFF_T
 
-/* The size of a `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
 #undef SIZEOF_LONG
 
-/* The size of a `size_t', as computed by sizeof. */
+/* The size of `size_t', as computed by sizeof. */
 #undef SIZEOF_SIZE_T
 
-/* The size of a `time_t', as computed by sizeof. */
+/* The size of `time_t', as computed by sizeof. */
 #undef SIZEOF_TIME_T
 
 /* Define to 1 if you have the ANSI C header files. */
@@ -685,7 +685,7 @@
 /* type to use in place of in_addr_t if not defined */
 #undef in_addr_t
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
 
 /* type to use in place of socklen_t if not defined */

Modified: freeswitch/trunk/libs/js/nsprpub/config/rules.mk
==============================================================================
--- freeswitch/trunk/libs/js/nsprpub/config/rules.mk	(original)
+++ freeswitch/trunk/libs/js/nsprpub/config/rules.mk	Mon Feb 18 09:58:41 2008
@@ -232,7 +232,7 @@
 #	$(NSINSTALL) -t -m 0644 $(RELEASE_HEADERS) $(DESTDIR)$(includedir)/$(include_subdir)
 #endif
 ifdef RELEASE_LIBS
-	$(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(prefix)/lib
+	$(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)
 endif
 	+$(LOOP_OVER_DIRS)
 

Modified: freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in	(original)
+++ freeswitch/trunk/libs/xmlrpc-c/xmlrpc_amconfig.h.in	Mon Feb 18 09:58:41 2008
@@ -81,5 +81,5 @@
 /* Version number of package */
 #undef VERSION
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t

Modified: freeswitch/trunk/src/Makefile.am
==============================================================================
--- freeswitch/trunk/src/Makefile.am	(original)
+++ freeswitch/trunk/src/Makefile.am	Mon Feb 18 09:58:41 2008
@@ -1,3 +1 @@
 SUBDIRS = mod
-
-

Modified: freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/Makefile	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/Makefile	Mon Feb 18 09:58:41 2008
@@ -39,4 +39,3 @@
 
 ../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
 
-

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile.am	Mon Feb 18 09:58:41 2008
@@ -8,7 +8,7 @@
 # Dirty trick to override the link output
 LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi
 
-moddir=$(prefix)/mod
+moddir=@modinstdir@
 
 MODNAME=mod_sofia
 

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile	Mon Feb 18 09:58:41 2008
@@ -6,9 +6,9 @@
 
 include sm.mak
 
-depend_install: $(DESTDIR)$(PREFIX)/lib/libjs.la
+depend_install: $(DESTDIR)$(libdir)/libjs.la
 
-$(DESTDIR)$(PREFIX)/lib/libjs.la: $(JSLA)
+$(DESTDIR)$(libdir)/libjs.la: $(JSLA)
 	cd $(JS_DIR)/nsprpub/ && $(MAKE) install
 	cd $(JS_DIR) && $(MAKE) install
 



More information about the Freeswitch-svn mailing list