From d17f14efbdaff87e84102d610b72def13e889ad2 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 2 Oct 2014 19:25:43 -0400 Subject: [PATCH] make sure to pass along appropriate configure flags to sub-configure's when cross compiling --- Makefile.am | 11 ++++++----- src/mod/codecs/mod_opus/Makefile.am | 4 +++- src/mod/directories/mod_ldap/Makefile.am | 2 +- src/mod/xml_int/mod_xml_ldap/Makefile.am | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index b25b08956f..0ad0f679ce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,6 +31,7 @@ AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -I$(switch_srcdir)/libs/sofia-sip/libsofia-s AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) $(AM_LIBAPR_LDFLAGS) $(AM_LIBAPU_LDFLAGS) DEFAULT_SOUNDS=en-us-callie-8000 +MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" .INTERMEDIATE: -ldl -liconv -lpthread @@ -456,7 +457,7 @@ libs/libzrtp/libzrtp.a: cd libs/libzrtp && $(MAKE) libs/sofia-sip/Makefile: - cd libs/sofia-sip && sh ./configure.gnu --prefix=$(prefix) + cd libs/sofia-sip && sh ./configure.gnu $(MY_DEFAULT_ARGS) libs/sofia-sip/libsofia-sip-ua/sdp/.libs/libsdp.a libs/sofia-sip/libsofia-sip-ua/su/.libs/libsu.a: libs/sofia-sip/.update libs/sofia-sip/Makefile @cd libs/sofia-sip && $(MAKE) noop @@ -629,7 +630,7 @@ sndfile-reconf: tiff-reconf: cd libs/tiff-4.0.2 && autoreconf -fi - cd libs/tiff-4.0.2 && sh ./configure.gnu + cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS) cd libs/tiff-4.0.2 && make python-reconf: @@ -645,19 +646,19 @@ srtp-reconf: iks-reconf: cd libs/iksemel && $(MAKE) clean cd libs/iksemel && autoreconf -fi - cd libs/iksemel && sh ./configure.gnu --prefix=$(prefix) + cd libs/iksemel && sh ./configure.gnu $(MY_DEFAULT_ARGS) $(MAKE) mod_dingaling-clean spandsp-reconf: tiff-reconf cd libs/spandsp && $(MAKE) clean || echo cd libs/spandsp && autoreconf -fi - cd libs/spandsp && sh ./configure.gnu --prefix=$(prefix) + cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS) cd libs/spandsp && $(MAKE) sofia-reconf: cd libs/sofia-sip && sh ./autogen.sh cd libs/sofia-sip && $(MAKE) clean - cd libs/sofia-sip && ./configure --prefix=$(prefix) --with-pic --with-glib=no --disable-shared + cd libs/sofia-sip && ./configure $(MY_DEFAULT_ARGS) --with-pic --with-glib=no --disable-shared lua-reconf: cd src/mod/languages/mod_lua/lua && make clean diff --git a/src/mod/codecs/mod_opus/Makefile.am b/src/mod/codecs/mod_opus/Makefile.am index 647358601f..0dadfc05ab 100644 --- a/src/mod/codecs/mod_opus/Makefile.am +++ b/src/mod/codecs/mod_opus/Makefile.am @@ -11,13 +11,15 @@ mod_opus_la_CFLAGS = $(AM_CFLAGS) -I$(OPUS_DIR)/include mod_opus_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(OPUS_LA) mod_opus_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm -lz +MY_DEFAULT_ARGS = --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-shared --with-pic --srcdir=$(OPUS_DIR) + BUILT_SOURCES=$(OPUS_LA) $(OPUS_DIR)/configure: $(GETLIB) $(OPUS).tar.gz $(OPUS_BUILDDIR)/Makefile: $(OPUS_DIR)/configure mkdir -p $(OPUS_BUILDDIR) - cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure --disable-shared --with-pic --srcdir=$(OPUS_DIR) + cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure $(MY_DEFAULT_ARGS) $(TOUCH_TARGET) $(OPUS_LA): $(OPUS_BUILDDIR)/Makefile diff --git a/src/mod/directories/mod_ldap/Makefile.am b/src/mod/directories/mod_ldap/Makefile.am index 5526eb9074..b5a4586239 100644 --- a/src/mod/directories/mod_ldap/Makefile.am +++ b/src/mod/directories/mod_ldap/Makefile.am @@ -13,7 +13,7 @@ mod_ldap_la_CFLAGS = $(AM_CFLAGS) -DWITH_OPENLDAP -DLDAP_DEPRECATED -I$(LDAP_D mod_ldap_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LDAPLA) $(LIBLBERLA) mod_ldap_la_LDFLAGS = -avoid-version -module -no-undefined -shared -MY_DEFAULT_ARGS= --disable-slapd --disable-bdb --disable-hdb +MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-slapd --disable-bdb --disable-hdb $(MODNAME).lo: $(LDAPLA) $(LIBLBERLA) diff --git a/src/mod/xml_int/mod_xml_ldap/Makefile.am b/src/mod/xml_int/mod_xml_ldap/Makefile.am index 7b1348046e..650587a192 100644 --- a/src/mod/xml_int/mod_xml_ldap/Makefile.am +++ b/src/mod/xml_int/mod_xml_ldap/Makefile.am @@ -17,7 +17,7 @@ mod_xml_ldap_la_LDFLAGS = -avoid-version -module -no-undefined -shared BUILT_SOURCES=$(LDAPLA) $(LIBLBERLA) $(LIBLUTILA) -MY_DEFAULT_ARGS= --disable-slapd --disable-slurpd --disable-relay --disable-bdb --disable-hdb +MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-slapd --disable-slurpd --disable-relay --disable-bdb --disable-hdb $(LDAP_DIR): $(GETLIB) $(LDAP).tar.gz