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 \
@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
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)," \
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
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@
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:
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
# 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=
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)
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
/* 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. */
/* 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 */
# $(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)
/* 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
../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)
-
# 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
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