]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Make libdir and bindir being accepted by libs and modules
authorMichal Bielicki <michal.bielicki@seventhsignal.de>
Mon, 18 Feb 2008 14:58:41 +0000 (14:58 +0000)
committerMichal Bielicki <michal.bielicki@seventhsignal.de>
Mon, 18 Feb 2008 14:58:41 +0000 (14:58 +0000)
add a setting called --modinstdir to be able to define where modules get installed

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7663 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index 6fc95f20918ab9286fa8c03bb74bbcb9aec8a89c..e0b78224baa09dd0fd7d39ee5eab6b2155928c5e 100644 (file)
@@ -31,6 +31,9 @@ sounds-install: sounds-en-us-callie-8000-install
 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 @@ install-data-local:
        @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 @@ dox:
 
 scripts/fsxs: scripts/fsxs.in
        @echo creating fsxs
-       @sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-           -e "s,@LIB_DIR\@,$(PREFIX)/lib," \
-           -e "s,@BIN_DIR\@,$(PREFIX)/bin," \
-           -e "s,@INC_DIR\@,$(PREFIX)/include," \
+       @sed -e "s,@MODULES_DIR\@,@modinstdir@," \
+           -e "s,@LIB_DIR\@,@libdir@," \
+           -e "s,@BIN_DIR\@,@bindir@," \
+           -e "s,@INC_DIR\@,@includedir@," \
            -e "s,@CFG_DIR\@,$(PREFIX)/conf," \
            -e "s,@DB_DIR\@,$(PREFIX)/db," \
            -e "s,@PREFIX\@,$(PREFIX)," \
@@ -365,7 +369,7 @@ megaclean: eclean modclean
        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
index 008b710731689a98e6dff49f38ada1df350eaf8c..2ca0b99a8e9072e335d5813cb68caf372417a9f4 100644 (file)
@@ -24,9 +24,10 @@ CURLLA=$(CURL_DIR)/lib/libcurl.la
 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 @@ $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJ
 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:
index 7a7be66294016988dbb46527c30f9c35ed025ba4..a64a4718023cf5b1bc8513e8a377f56af053356d 100644 (file)
@@ -30,8 +30,11 @@ switch_builddir=`pwd`
 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 @@ AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
 # 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(int64_t_fmt)
 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/sofia-sip)
 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
index 8602189707771fc5967cc202d5692b079195dda1..4bc60b0df18042938b2435bfe78e445fc9ee644c 100644 (file)
 /* Define to the function return type for send. */
 #undef SEND_TYPE_RETV
 
-/* The size of `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 `long', as computed by sizeof. */
+/* The size of `long', as computed by sizeof. */
 #undef SIZEOF_LONG
 
-/* The size of `size_t', as computed by sizeof. */
+/* The size of `size_t', as computed by sizeof. */
 #undef SIZEOF_SIZE_T
 
-/* The size of `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. */
 /* 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 */
index 40ddff631c8ca8273467f85ab29cca008c5d6cc6..be5374dfc8e31c945b5b18d02f0a60a778770fe5 100644 (file)
@@ -232,7 +232,7 @@ install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
 #      $(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)
 
index 99479b65afe56bf6a3c0748b1c2468d8612e1bef..b73edb35a955c1283f60ea315dc86cba34f6bff6 100644 (file)
@@ -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
index 245b3685ae95ca4db89f53cae7238d0362b591ee..b7c8acd0d801c84262da01a3edf94bca169a18d7 100644 (file)
@@ -1,3 +1 @@
 SUBDIRS = mod
-
-
index a18ca9ed4e112b6682cafd8fcab5c10baa0f5b52..a17d4c6e1ffa51cd486824c440b28b6b4d6691b2 100644 (file)
@@ -39,4 +39,3 @@ $(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update
 
 ../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
 
-
index 98cf98859d57403a4bc674a20b178d50e720b27c..b25c4293477a31d6f7a406f24fee912713939a2e 100644 (file)
@@ -8,7 +8,7 @@ AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s`
 # 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
 
index 811ac16b5e522cf40b4d8246293e952aaaf0e1cf..975b45d3e88e0dad08d656702f5bdb02c6903a81 100644 (file)
@@ -6,9 +6,9 @@ LOCAL_LIBADD=
 
 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