b1c441ff73
* Sane C/CXX/CPP/LDFLAGS * --with/--without settings * Proper gettext support * System portability changes (to support OS X and all other unix-like osen) * Features to allow for proper compile time settings (support exists features need to be added) This comes with no warrenty at the moment, auto3 and asa support are both incomplete/non-existent, there is no documentation and some conftests still nee$ to be written. It's still incomplete try it at your own risk! Originally committed to SVN as r1865.
30 lines
609 B
Text
30 lines
609 B
Text
AC_DEFUN([AC_C_FLAG], [{
|
|
AC_LANG_PUSH(C)
|
|
ac_c_flag_save="$CFLAGS"
|
|
CFLAGS="$CFLAGS $1"
|
|
AC_MSG_CHECKING([[whether $CC supports $1]])
|
|
AC_COMPILE_IFELSE(
|
|
[AC_LANG_PROGRAM([[]])],
|
|
[AC_MSG_RESULT([yes])],
|
|
[
|
|
CFLAGS="$ac_c_flag_save"
|
|
AC_MSG_RESULT([no])
|
|
$2
|
|
])
|
|
AC_LANG_POP(C)
|
|
}])
|
|
AC_DEFUN([AC_CXX_FLAG], [{
|
|
AC_LANG_PUSH(C++)
|
|
ac_cxx_flag_save="$CXXFLAGS"
|
|
CXXFLAGS="$CXXFLAGS $1"
|
|
AC_MSG_CHECKING([[whether $CXX supports $1]])
|
|
AC_COMPILE_IFELSE(
|
|
[AC_LANG_PROGRAM([[]])],
|
|
[AC_MSG_RESULT([yes])],
|
|
[
|
|
CXXFLAGS="$ac_cxx_flag_save"
|
|
AC_MSG_RESULT([no])
|
|
$2
|
|
])
|
|
AC_LANG_POP(C++)
|
|
}])
|