dnl in a different context somewhere else.
dnl gcc_AC_CHECK_DECL(SYMBOL,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
-AC_DEFUN([gcc_AC_CHECK_DECL],
-[AC_MSG_CHECKING([whether $1 is declared])
-AC_CACHE_VAL(gcc_cv_have_decl_$1,
-[AC_TRY_COMPILE([$4],
-[#ifndef $1
-char *(*pfn) = (char *(*)) $1 ;
-#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+AC_DEFUN(
+ [gcc_AC_CHECK_DECL],
+ [AC_MSG_CHECKING([whether $1 is declared])
+ AC_CACHE_VAL(
+ [gcc_cv_have_decl_$1],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$4],
+ [#ifndef $1
+ char *(*pfn) = (char *(*)) $1 ;
+ #endif]
+ )],
+ [eval "gcc_cv_have_decl_$1=yes"],
+ [eval "gcc_cv_have_decl_$1=no"]
+ )]
+ )
if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
else
fi
if test x"${private_dir}" = x; then
- AC_ERROR(could not find private Tcl headers)
+ AC_MSG_ERROR(could not find private Tcl headers)
else
TCL_PRIVATE_INCLUDE="-I${private_dir}"
AC_MSG_RESULT(${private_dir})
fi
if test x"${private_dir}" = x; then
- AC_ERROR(could not find Tk private headers)
+ AC_MSG_ERROR(could not find Tk private headers)
else
TK_PRIVATE_INCLUDE="-I${private_dir}"
AC_MSG_RESULT(${private_dir})
LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
LIBS="-lbfd -liberty -lz $intl $LIBS"
- AC_CACHE_CHECK([$1], [$2],
- [AC_TRY_LINK(
- [#include <stdlib.h>
- #include "bfd.h"
- #include "$4"
- ],
- [return $3;], [[$2]=yes], [[$2]=no])])
+ AC_CACHE_CHECK(
+ [$1],
+ [$2],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <stdlib.h>
+ #include "bfd.h"
+ #include "$4"],
+ [return $3;]
+ )],
+ [[$2]=yes],
+ [[$2]=no]
+ )]
+ )
CFLAGS=$OLD_CFLAGS
LDFLAGS=$OLD_LDFLAGS
LIBS=$OLD_LIBS])
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- #include "bfd.h"
- #include "elf-bfd.h"
-
+ #include "bfd.h"
+ #include "elf-bfd.h"
int
main ()
{
return bfd_get_elf_phdr_upper_bound (NULL);
+
;
return 0;
}
gdb_cv_var_elf=yes
else
gdb_cv_var_elf=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
$as_echo "$gdb_cv_var_elf" >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- #include "bfd.h"
- #include "mach-o.h"
-
+ #include "bfd.h"
+ #include "mach-o.h"
int
main ()
{
return bfd_mach_o_lookup_command (NULL, 0, NULL);
+
;
return 0;
}
gdb_cv_var_macho=yes
else
gdb_cv_var_macho=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
$as_echo "$gdb_cv_var_macho" >&6; }