AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
- for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ clang:__clang__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
#set SOLINK variable based on compiler and host
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
-elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
+elif test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then
case "$host" in
- *darwin12.*|*darwin11.*|*darwin10.*)
+ *darwin*)
SOLINK="-dynamic -force-flat-namespace"
;;
+ *)
+ AC_ERROR([Please update configure.in with SOLINK values for your compiler])
+ ;;
+
+ esac
+elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
+ case "$host" in
+# older Xcode test for darwin, Xcode 4/5 use clang above
*darwin*)
SOLINK="-dynamic -bundle -force-flat-namespace"
;;
else
AC_ERROR([Please update configure.in with SOLINK values for your compiler])
fi
-
# set DYNAMIC_LIB_EXTEN
# we should really be using libtool so we don't need to do this
case "$host" in
fi
CFLAGS="$saved_CFLAGS"
+# Next check added for Xcode 5 and systems with clang 5 llvm 3.3 or above, extended offset must be off
+AC_CACHE_CHECK([whether compiler supports -Wextended-offsetof], [ac_cv_clang_extended_offsetof], [
+AC_TRY_COMPILE([],[return 0;],[ac_cv_clang_extended_offsetof=yes],[ac_cv_clang_extended_offsetof=no])
+])
+AC_MSG_RESULT($ac_cv_clang_extended_offsetof)
+if test x"$ac_cv_clang_extended_offsetof" = xyes; then
+ APR_ADDTO(CFLAGS, -Wno-extended-offsetof)
+fi
+
+
# Tested and fixed lot of modules, but some are untested. Will be added back when the core team decide it ready
# Untested modules : mod_osp mod_soundtouch mod_sangoma_codec mod_dingaling mod_opal mod_skypopen mod_h323 mod_khomp
# mod_unimrcp mod_cepstral mod_erlang_event mod_snmp mod_perl mod_java mod_managed