Changeset 3168


Ignore:
Timestamp:
May 12, 2010 10:59:20 AM (14 years ago)
Author:
bennylp
Message:

Support for iPhone tools in the build system:

  • more flexible redeclaration of build tools. Now users may override build tools with environment variables, e.g. CC, AR, RANLIB, etc.
  • added configure-iphone: configure wrapper for iphone
  • tested with iPhone 2.x SDK

This closes #1050

Location:
pjproject/branches/projects/iphone
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/iphone/aconfigure

    r3099 r3168  
    672672CXXFLAGS 
    673673ac_ct_CXX 
     674AR 
     675LD 
     676LDOUT 
     677RANLIB 
     678LIBEXT 
     679LIBEXT2 
     680CC_OUT 
     681CC_INC 
     682CC_DEF 
     683CC_OPTIMIZE 
     684CC_CFLAGS 
    674685ac_pjdir 
    675686ac_build_mak_vars 
     
    19461957ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h" 
    19471958 
    1948 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 third_party/build/os-auto.mak third_party/build/portaudio/os-auto.mak" 
     1959ac_config_files="$ac_config_files build.mak build/os-auto.mak build/cc-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak third_party/build/portaudio/os-auto.mak" 
    19491960 
    19501961 
     
    32463257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 
    32473258ac_compiler_gnu=$ac_cv_c_compiler_gnu 
     3259 
     3260 
     3261if test "$AR" = ""; then AR="$(CROSS_COMPILE)ar rv"; fi 
     3262 
     3263if test "$LD" = ""; then LD="$CC"; fi 
     3264 
     3265if test "$LDOUT" = ""; then LDOUT="-o"; fi 
     3266 
     3267if test "$RANLIB" = ""; then RANLIB="$(CROSSCOMPILE)ranlib"; fi 
     3268 
     3269if test "$OBJEXT" = ""; then OBJEXT='o'; fi 
     3270 
     3271if test "$LIBEXT" = ""; then LIBEXT='a'; fi 
     3272 
     3273if test "$LIBEXT2" = ""; then LIBEXT2=""; fi 
     3274 
     3275if test "$CC_OUT" = ""; then CC_OUT="-o"; fi 
     3276 
     3277if test "$CC_INC" = ""; then CC_INC="-I"; fi 
     3278 
     3279if test "$CC_DEF" = ""; then CC_DEF="-D"; fi 
     3280 
     3281if test "$CC_OPTIMIZE" = ""; then CC_OPTIMIZE="-O2"; fi 
     3282 
     3283if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi 
     3284 
     3285 
    32483286 
    32493287 
     
    1100311041else 
    1100411042 case $target in 
     11043  arm-apple-darwin*) 
     11044        LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox" 
     11045        { echo "$as_me:$LINENO: result: Checking sound device backend... AudioUnit" >&5 
     11046echo "${ECHO_T}Checking sound device backend... AudioUnit" >&6; } 
     11047        ;; 
    1100511048  *darwin*) 
    1100611049        LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" 
     
    1277012813    "build.mak") CONFIG_FILES="$CONFIG_FILES build.mak" ;; 
    1277112814    "build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES build/os-auto.mak" ;; 
     12815    "build/cc-auto.mak") CONFIG_FILES="$CONFIG_FILES build/cc-auto.mak" ;; 
    1277212816    "pjlib/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib/build/os-auto.mak" ;; 
    1277312817    "pjlib-util/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;; 
     
    1289612940CXXFLAGS!$CXXFLAGS$ac_delim 
    1289712941ac_ct_CXX!$ac_ct_CXX$ac_delim 
     12942AR!$AR$ac_delim 
     12943LD!$LD$ac_delim 
     12944LDOUT!$LDOUT$ac_delim 
     12945RANLIB!$RANLIB$ac_delim 
     12946LIBEXT!$LIBEXT$ac_delim 
     12947LIBEXT2!$LIBEXT2$ac_delim 
     12948CC_OUT!$CC_OUT$ac_delim 
     12949CC_INC!$CC_INC$ac_delim 
     12950CC_DEF!$CC_DEF$ac_delim 
     12951CC_OPTIMIZE!$CC_OPTIMIZE$ac_delim 
     12952CC_CFLAGS!$CC_CFLAGS$ac_delim 
    1289812953ac_pjdir!$ac_pjdir$ac_delim 
    1289912954ac_build_mak_vars!$ac_build_mak_vars$ac_delim 
     
    1292312978libssl_present!$libssl_present$ac_delim 
    1292412979libcrypto_present!$libcrypto_present$ac_delim 
    12925 ac_cross_compile!$ac_cross_compile$ac_delim 
    12926 ac_linux_poll!$ac_linux_poll$ac_delim 
    12927 ac_host!$ac_host$ac_delim 
    12928 ac_main_obj!$ac_main_obj$ac_delim 
    12929 LIBOBJS!$LIBOBJS$ac_delim 
    12930 LTLIBOBJS!$LTLIBOBJS$ac_delim 
    12931 _ACEOF 
    12932  
    12933   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then 
     12980_ACEOF 
     12981 
     12982  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then 
    1293412983    break 
    1293512984  elif $ac_last_try; then 
     
    1295012999cat >>$CONFIG_STATUS <<_ACEOF 
    1295113000cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof 
     13001/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 
     13002_ACEOF 
     13003sed ' 
     13004s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g 
     13005s/^/s,@/; s/!/@,|#_!!_#|/ 
     13006:n 
     13007t n 
     13008s/'"$ac_delim"'$/,g/; t 
     13009s/$/\\/; p 
     13010N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n 
     13011' >>$CONFIG_STATUS <conf$$subs.sed 
     13012rm -f conf$$subs.sed 
     13013cat >>$CONFIG_STATUS <<_ACEOF 
     13014CEOF$ac_eof 
     13015_ACEOF 
     13016 
     13017 
     13018ac_delim='%!_!# ' 
     13019for ac_last_try in false false false false false :; do 
     13020  cat >conf$$subs.sed <<_ACEOF 
     13021ac_cross_compile!$ac_cross_compile$ac_delim 
     13022ac_linux_poll!$ac_linux_poll$ac_delim 
     13023ac_host!$ac_host$ac_delim 
     13024ac_main_obj!$ac_main_obj$ac_delim 
     13025LIBOBJS!$LIBOBJS$ac_delim 
     13026LTLIBOBJS!$LTLIBOBJS$ac_delim 
     13027_ACEOF 
     13028 
     13029  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then 
     13030    break 
     13031  elif $ac_last_try; then 
     13032    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 
     13033echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 
     13034   { (exit 1); exit 1; }; } 
     13035  else 
     13036    ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 
     13037  fi 
     13038done 
     13039 
     13040ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` 
     13041if test -n "$ac_eof"; then 
     13042  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` 
     13043  ac_eof=`expr $ac_eof + 1` 
     13044fi 
     13045 
     13046cat >>$CONFIG_STATUS <<_ACEOF 
     13047cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof 
    1295213048/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end 
    1295313049_ACEOF 
     
    1320713303s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 
    1320813304$ac_datarootdir_hack 
    13209 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out 
     13305" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 
    1321013306 
    1321113307test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 
  • pjproject/branches/projects/iphone/aconfigure.ac

    r3099 r3168  
    1414AC_CONFIG_FILES([build.mak  
    1515                 build/os-auto.mak  
     16                 build/cc-auto.mak 
    1617                 pjlib/build/os-auto.mak  
    1718                 pjlib-util/build/os-auto.mak  
     
    3435CXXFLAGS="$CFLAGS $CXXFLAGS" 
    3536 
     37dnl # 
     38dnl # Configure tools 
     39dnl # 
    3640AC_PROG_CC 
    3741AC_PROG_CXX 
    3842AC_LANG_C 
     43 
     44if test "$AR" = ""; then AR="$(CROSS_COMPILE)ar rv"; fi 
     45AC_SUBST(AR) 
     46if test "$LD" = ""; then LD="$CC"; fi 
     47AC_SUBST(LD) 
     48if test "$LDOUT" = ""; then LDOUT="-o"; fi 
     49AC_SUBST(LDOUT) 
     50if test "$RANLIB" = ""; then RANLIB="$(CROSSCOMPILE)ranlib"; fi 
     51AC_SUBST(RANLIB) 
     52if test "$OBJEXT" = ""; then OBJEXT='o'; fi 
     53AC_SUBST(OBJEXT) 
     54if test "$LIBEXT" = ""; then LIBEXT='a'; fi 
     55AC_SUBST(LIBEXT) 
     56if test "$LIBEXT2" = ""; then LIBEXT2=""; fi 
     57AC_SUBST(LIBEXT2) 
     58if test "$CC_OUT" = ""; then CC_OUT="-o"; fi 
     59AC_SUBST(CC_OUT) 
     60if test "$CC_INC" = ""; then CC_INC="-I"; fi 
     61AC_SUBST(CC_INC) 
     62if test "$CC_DEF" = ""; then CC_DEF="-D"; fi 
     63AC_SUBST(CC_DEF) 
     64if test "$CC_OPTIMIZE" = ""; then CC_OPTIMIZE="-O2"; fi 
     65AC_SUBST(CC_OPTIMIZE) 
     66if test "$CC_CFLAGS" = ""; then CC_CFLAGS="-Wall"; fi 
     67AC_SUBST(CC_CFLAGS) 
     68 
     69 
    3970 
    4071AC_SUBST(ac_pjdir) 
     
    475506else 
    476507 case $target in 
     508  arm-apple-darwin*) 
     509        LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox" 
     510        AC_MSG_RESULT([Checking sound device backend... AudioUnit]) 
     511        ;; 
    477512  *darwin*) 
    478513        LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" 
  • pjproject/branches/projects/iphone/build

    • Property svn:ignore
      •  

        old new  
        22*.opt 
        33os-auto.mak 
         4cc-auto.mak 
  • pjproject/branches/projects/iphone/build.mak.in

    r3063 r3168  
    6161# CFLAGS, LDFLAGS, and LIBS to be used by applications 
    6262export PJDIR := @ac_pjdir@ 
    63 export APP_CC := $(CROSS_COMPILE)$(CC_NAME) 
     63export APP_CC := @CC@ 
     64export APP_CXX := @CXX@ 
    6465export APP_CFLAGS := -DPJ_AUTOCONF=1\ 
    6566        @CFLAGS@\ 
     
    106107export PJ_DIR := $(PJDIR) 
    107108export PJ_CC := $(APP_CC) 
     109export PJ_CXX := $(APP_CXX) 
    108110export PJ_CFLAGS := $(APP_CFLAGS) 
    109111export PJ_CXXFLAGS := $(APP_CXXFLAGS) 
  • pjproject/branches/projects/iphone/build/common.mak

    r1180 r3168  
    1616# 
    1717-include cc-$(CC_NAME).mak 
     18 
     19# 
     20# Include auto configured compiler specification. 
     21# This will override the compiler settings above. 
     22# Currently this is made OPTIONAL, to prevent people 
     23# from getting errors because they don't re-run ./configure 
     24# after downloading new PJSIP. 
     25# 
     26-include $(PJDIR)/build/cc-auto.mak 
    1827 
    1928# 
  • pjproject/branches/projects/iphone/build/rules.mak

    r2183 r3168  
    6666        @echo $(APP)_LDFLAGS=$($(APP)_LDFLAGS) 
    6767        @echo DEPFLAGS=$(DEPFLAGS) 
     68        @echo CC=$(CC) 
     69        @echo AR=$(AR) 
     70        @echo RANLIB=$(RANLIB) 
    6871 
    6972print_bin: print_common 
Note: See TracChangeset for help on using the changeset viewer.