diff options
-rwxr-xr-x | aconfigure | 7 | ||||
-rw-r--r-- | aconfigure.ac | 4 | ||||
-rw-r--r-- | build.mak.in | 27 |
3 files changed, 37 insertions, 1 deletions
@@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_pjdir CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1443,6 +1443,7 @@ test -n "$target_alias" && ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak" + if test "$CFLAGS" = ""; then CFLAGS="-O2" else @@ -2744,6 +2745,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_pjdir=`pwd` + + echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 @@ -9773,6 +9777,7 @@ s,@OBJEXT@,$OBJEXT,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@ac_pjdir@,$ac_pjdir,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@ac_os_objs@,$ac_os_objs,;t t diff --git a/aconfigure.ac b/aconfigure.ac index d729c963..59e7d4df 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -19,6 +19,7 @@ AC_CONFIG_FILES([build.mak pjsip/build/os-auto.mak ]) + dnl dnl Setup default CFLAGS dnl @@ -34,6 +35,9 @@ AC_PROG_CC AC_PROG_CXX AC_LANG_C +AC_SUBST(ac_pjdir) +ac_pjdir=`pwd` + AC_CHECK_LIB(pthread,pthread_create) AC_CHECK_LIB(wsock32,puts) AC_CHECK_LIB(ws2_32,puts) diff --git a/build.mak.in b/build.mak.in index 86a4155f..43633e1f 100644 --- a/build.mak.in +++ b/build.mak.in @@ -6,3 +6,30 @@ export CC_NAME := gcc export TARGET_NAME := @target@ export CROSS_COMPILE := @ac_cross_compile@ export LINUX_POLL := @ac_linux_poll@ + +# Application can use this +export PJDIR := @ac_pjdir@ +export APP_CC := $(CROSS_COMPILE)$(CC_NAME) +export APP_CFLAGS := -DPJ_AUTOCONF=1\ + @CFLAGS@\ + -I$(PJDIR)/pjlib/include\ + -I$(PJDIR)/pjlib-util/include\ + -I$(PJDIR)/pjmedia/include\ + -I$(PJDIR)/pjsip/include +export APP_CXXFLAGS := $(APP_CFLAGS) +export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\ + -L$(PJDIR)/pjlib-util/lib\ + -L$(PJDIR)/pjmedia/lib\ + -L$(PJDIR)/pjsip/lib\ + @LDFLAGS@ +export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\ + -lpjsip-ua-$(TARGET_NAME)\ + -lpjsip-simple-$(TARGET_NAME)\ + -lpjsip-$(TARGET_NAME)\ + -lpjmedia-codec-$(TARGET_NAME)\ + -lpjmedia-$(TARGET_NAME)\ + -lpjmedia-codec-$(TARGET_NAME)\ + -lpjlib-util-$(TARGET_NAME)\ + -lpj-$(TARGET_NAME)\ + @LIBS@ + |