AC_PREREQ(2.13)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
+AM_MAINTAINER_MODE
AC_PROG_CC
AC_AIX
*-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
AC_DEFINE(NEW_PROC_API)
;;
- *-*-solaris2.[678])
+ *-*-solaris2.[[678]])
AC_DEFINE(NEW_PROC_API)
;;
esac
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
+ dnl Check for broken prfpregset_t type
+
+ dnl For Linux/i386, glibc 2.1.3 was released with a bogus
+ dnl prfpregset_t type (it's a typedef for the pointer to a struct
+ dnl instead of the struct itself). We detect this here, and work
+ dnl around it in lin-thread.c.
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ AC_MSG_CHECKING(whether prfpregset_t type is broken)
+ AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
+ [AC_TRY_RUN([#include <sys/procfs.h>
+ int main ()
+ {
+ if (sizeof (prfpregset_t) == sizeof (void *))
+ return 1;
+ return 0;
+ }],
+ gdb_cv_prfpregset_t_broken=no,
+ gdb_cv_prfpregset_t_broken=yes,
+ gdb_cv_prfpregset_t_broken=yes)])
+ AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
+ if test $gdb_cv_prfpregset_t_broken = yes; then
+ AC_DEFINE(PRFPREGSET_T_BROKEN)
+ fi
+ fi
+
dnl Check for PIOCSET ioctl entry
AC_MSG_CHECKING(for PIOCSET ioctl entry in sys/procfs.h)
CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
fi
+
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith"
+# Not yet: -Wall -Wpointer-arith -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[
-# not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith"
-case "${enableval}" in
+[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
-fi
+fi])dnl
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
*) WARN_CFLAGS="${WARN_CFLAGS} $w"
esac
done
-fi],[build_warnings=""])dnl
-
+fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
*) AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
esac],[want_included_regex=true])dnl
-REGEX="gnu-regex.o"
-REGEX_CFLAGS="-DUSE_INCLUDED_REGEX"
if test $want_included_regex = false; then
AC_MSG_CHECKING(for GNU regex)
AC_CACHE_VAL(gdb_cv_have_gnu_regex,
[gdb_cv_have_gnu_regex=yes],
[gdb_cv_have_gnu_regex=no])])
AC_MSG_RESULT($gdb_cv_have_gnu_regex)
- if test $gdb_cv_have_gnu_regex = yes; then
- REGEX=
- REGEX_CFLAGS=
+ if test $gdb_cv_have_gnu_regex = no; then
+ want_included_regex=true
fi
fi
+
+if test x${want_included_regex} = xtrue; then
+ REGEX="gnu-regex.o"
+ AC_DEFINE(USE_INCLUDED_REGEX)
+fi
AC_SUBST(REGEX)
-AC_SUBST(REGEX_CFLAGS)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,