Make libdir and bindir being accepted by libs and modules
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
This commit is contained in:
parent
6cc890bfc1
commit
b552cb3a6c
14
Makefile.am
14
Makefile.am
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
14
configure.in
14
configure.in
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
SUBDIRS = mod
|
||||
|
||||
|
||||
|
|
|
@ -39,4 +39,3 @@ $(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update
|
|||
|
||||
../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue