gdbserver: replace AC_TRY_COMPILE in acinclude.m4
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:31:00 +0000 (08:31 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:31:00 +0000 (08:31 -0400)
... with AC_COMPILE_IFELSE and AC_LANG_PROGRAM.

All changes in the generated configure file are insignificant
whitespace changes.

gdbserver/ChangeLog:

* acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
AC_LANG_PROGRAM.
* configure: Re-generate.

Change-Id: Idab8b5e1a984046b5283940c02e5a22da2291d58

gdbserver/ChangeLog
gdbserver/acinclude.m4
gdbserver/configure

index 505ad8ef9f6960e4ea43c54c5c70574ffa6e2184..e1ba057a32ddccf184231b0fa2336965a1b5e0b1 100644 (file)
@@ -1,3 +1,9 @@
+2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
+       AC_LANG_PROGRAM.
+       * configure: Re-generate.
+
 2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * configure: Re-generate.
index f02a63cc70c33f0c19538d24255e76e1dd1435d3..e18ee9913a5c2ad150bea58448585baf1438db3e 100644 (file)
@@ -42,18 +42,20 @@ m4_include(../config/gettext-sister.m4)
 dnl Check for existence of a type $1 in libthread_db.h
 dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4.
 
-AC_DEFUN([GDBSERVER_HAVE_THREAD_DB_TYPE],
-[AC_MSG_CHECKING([for $1 in thread_db.h])
- AC_CACHE_VAL(gdbserver_cv_have_thread_db_type_$1,
-   [AC_TRY_COMPILE([
-#include <thread_db.h>],
-      [$1 avar],
-      gdbserver_cv_have_thread_db_type_$1=yes,
-      gdbserver_cv_have_thread_db_type_$1=no
-   )])
- if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
-   AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
-            [Define if <thread_db.h> has $1.])
- fi
- AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)
-])
+AC_DEFUN(
+  [GDBSERVER_HAVE_THREAD_DB_TYPE],
+  [AC_MSG_CHECKING([for $1 in thread_db.h])
+   AC_CACHE_VAL(
+     [gdbserver_cv_have_thread_db_type_$1],
+     [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([#include <thread_db.h>], [$1 avar])],
+       [gdbserver_cv_have_thread_db_type_$1=yes],
+       [gdbserver_cv_have_thread_db_type_$1=no]
+      )]
+   )
+   if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
+     AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
+              [Define if <thread_db.h> has $1.])
+   fi
+   AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)]
+)
index bd48d67973d063bb2df4bfffc85194721ef99de2..0db0ad3f4fbd942500e1abe820a4b335b20631ea 100755 (executable)
 if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
 $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
- if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
  if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <thread_db.h>
 int
 main ()
@@ -10408,14 +10407,15 @@ else
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
 
- if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
  if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
 
 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
 $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
 
 fi
 if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
 $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
- if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
  if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <thread_db.h>
 int
 main ()
@@ -10445,14 +10444,15 @@ else
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
 
- if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
  if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
 
 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
 $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
 
 fi