1 dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
2 AC_DEFUN([DPKG_CACHED_TRY_COMPILE],[
5 AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
7 if test "x$$2" = xyes; then
16 dnl DPKG_C_GCC_ATTRIBUTE(<short-label>,<cachevar>,<func-params>,<attribute>,<HAVE>,<desc>,[<true-cmds>],[<false-cmds>])
17 AC_DEFUN([DPKG_C_GCC_ATTRIBUTE],[
18 DPKG_CACHED_TRY_COMPILE(__attribute__(($1)),dpkg_cv_c_attribute_$2,,
19 [extern int testfunction($3) __attribute__(($4))],
21 AC_DEFINE(HAVE_GNUC25_$5,,$6)
27 dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<cachevar>)
28 AC_DEFUN([DPKG_C_GCC_TRY_WARNS],[
29 AC_MSG_CHECKING([GCC warning flag(s) $1])
30 if test "${GCC-no}" = yes
33 if $CC $1 -c /dev/null 2>/dev/null; then
39 if test "x$$2" = xyes; then
46 AC_MSG_RESULT(no, not using GCC)
49 dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
52 dnl Check if a #define is present in an include file
53 AC_DEFUN([DPKG_CHECK_DEFINE],
54 [AC_CACHE_CHECK(if $1 is defined in $2,
64 if test "$ac_cv_define_$1" = yes ; then
65 AC_DEFINE(HAVE_$1,,[define if $1 is defined])