Jan Kratochvil 43e595b
Index: gdb-7.5.91.20130323/gdb/config.in
Jan Kratochvil f8eee05
===================================================================
Jan Kratochvil 43e595b
--- gdb-7.5.91.20130323.orig/gdb/config.in	2013-03-23 19:48:18.000000000 +0100
Jan Kratochvil 43e595b
+++ gdb-7.5.91.20130323/gdb/config.in	2013-03-23 19:50:53.300066378 +0100
Jan Kratochvil 43e595b
@@ -216,6 +216,9 @@
Jan Kratochvil 01b1870
 /* Define if librpm library is being used. */
Jan Kratochvil 01b1870
 #undef HAVE_LIBRPM
Jan Kratochvil 01b1870
 
Jan Kratochvil 01b1870
+/* Define to 1 if you have the `selinux' library (-lselinux). */
Jan Kratochvil 01b1870
+#undef HAVE_LIBSELINUX
Jan Kratochvil 01b1870
+
Jan Kratochvil f8eee05
 /* Define to 1 if you have the <libunwind-ia64.h> header file. */
Jan Kratochvil f8eee05
 #undef HAVE_LIBUNWIND_IA64_H
Jan Kratochvil 01b1870
 
Jan Kratochvil 43e595b
@@ -360,6 +363,9 @@
Jan Kratochvil 01b1870
 /* Define to 1 if you have the `sbrk' function. */
Jan Kratochvil 01b1870
 #undef HAVE_SBRK
Jan Kratochvil 01b1870
 
Jan Kratochvil 01b1870
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
Jan Kratochvil 01b1870
+#undef HAVE_SELINUX_SELINUX_H
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
 /* Define to 1 if you have the `setlocale' function. */
Jan Kratochvil 01b1870
 #undef HAVE_SETLOCALE
Jan Kratochvil 01b1870
 
Jan Kratochvil 43e595b
Index: gdb-7.5.91.20130323/gdb/configure
Jan Kratochvil f8eee05
===================================================================
Jan Kratochvil 43e595b
--- gdb-7.5.91.20130323.orig/gdb/configure	2013-03-23 19:48:18.000000000 +0100
Jan Kratochvil 43e595b
+++ gdb-7.5.91.20130323/gdb/configure	2013-03-23 19:50:53.303066376 +0100
Jan Kratochvil 43e595b
@@ -12814,6 +12814,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >>
Jan Kratochvil 01b1870
 
Jan Kratochvil 01b1870
 fi
Jan Kratochvil 01b1870
 
Jan Kratochvil 01b1870
+for ac_header in selinux/selinux.h
Jan Kratochvil 01b1870
+do :
Jan Kratochvil 01b1870
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
Jan Kratochvil 01b1870
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
Jan Kratochvil 01b1870
+  cat >>confdefs.h <<_ACEOF
Jan Kratochvil 01b1870
+#define HAVE_SELINUX_SELINUX_H 1
Jan Kratochvil 01b1870
+_ACEOF
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+fi
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+done
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
Jan Kratochvil 01b1870
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
Jan Kratochvil 01b1870
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
Jan Kratochvil 01b1870
+  $as_echo_n "(cached) " >&6
Jan Kratochvil 01b1870
+else
Jan Kratochvil 01b1870
+  ac_check_lib_save_LIBS=$LIBS
Jan Kratochvil 01b1870
+LIBS="-lselinux  $LIBS"
Jan Kratochvil 01b1870
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Jan Kratochvil 01b1870
+/* end confdefs.h.  */
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+/* Override any GCC internal prototype to avoid an error.
Jan Kratochvil 01b1870
+   Use char because int might match the return type of a GCC
Jan Kratochvil 01b1870
+   builtin and then its argument prototype would still apply.  */
Jan Kratochvil 01b1870
+#ifdef __cplusplus
Jan Kratochvil 01b1870
+extern "C"
Jan Kratochvil 01b1870
+#endif
Jan Kratochvil 01b1870
+char security_get_boolean_active ();
Jan Kratochvil 01b1870
+int
Jan Kratochvil 01b1870
+main ()
Jan Kratochvil 01b1870
+{
Jan Kratochvil 01b1870
+return security_get_boolean_active ();
Jan Kratochvil 01b1870
+  ;
Jan Kratochvil 01b1870
+  return 0;
Jan Kratochvil 01b1870
+}
Jan Kratochvil 01b1870
+_ACEOF
Jan Kratochvil 01b1870
+if ac_fn_c_try_link "$LINENO"; then :
Jan Kratochvil 01b1870
+  ac_cv_lib_selinux_security_get_boolean_active=yes
Jan Kratochvil 01b1870
+else
Jan Kratochvil 01b1870
+  ac_cv_lib_selinux_security_get_boolean_active=no
Jan Kratochvil 01b1870
+fi
Jan Kratochvil 01b1870
+rm -f core conftest.err conftest.$ac_objext \
Jan Kratochvil 01b1870
+    conftest$ac_exeext conftest.$ac_ext
Jan Kratochvil 01b1870
+LIBS=$ac_check_lib_save_LIBS
Jan Kratochvil 01b1870
+fi
Jan Kratochvil 01b1870
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
Jan Kratochvil 01b1870
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
Jan Kratochvil 01b1870
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
Jan Kratochvil 01b1870
+  cat >>confdefs.h <<_ACEOF
Jan Kratochvil 01b1870
+#define HAVE_LIBSELINUX 1
Jan Kratochvil 01b1870
+_ACEOF
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+  LIBS="-lselinux $LIBS"
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+fi
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
+
Jan Kratochvil 01b1870
 
Jan Kratochvil 01b1870
 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Jan Kratochvil 01b1870
 # except that the argument to --with-sysroot is optional.
Jan Kratochvil 43e595b
Index: gdb-7.5.91.20130323/gdb/gdbserver/config.in
Jan Kratochvil f8eee05
===================================================================
Jan Kratochvil 43e595b
--- gdb-7.5.91.20130323.orig/gdb/gdbserver/config.in	2013-03-11 09:35:09.000000000 +0100
Jan Kratochvil 43e595b
+++ gdb-7.5.91.20130323/gdb/gdbserver/config.in	2013-03-23 19:51:14.323052419 +0100
Jan Kratochvil 43e595b
@@ -73,6 +73,9 @@
Jan Kratochvil f8eee05
 /* Define to 1 if you have the `dl' library (-ldl). */
Jan Kratochvil f8eee05
 #undef HAVE_LIBDL
Jan Kratochvil f8eee05
 
Jan Kratochvil f8eee05
+/* Define to 1 if you have the `selinux' library (-lselinux). */
Jan Kratochvil f8eee05
+#undef HAVE_LIBSELINUX
Jan Kratochvil f8eee05
+
Jan Kratochvil 43e595b
 /* Define if the target supports branch tracing. */
Jan Kratochvil 43e595b
 #undef HAVE_LINUX_BTRACE
Jan Kratochvil f8eee05
 
Jan Kratochvil 43e595b
@@ -140,6 +143,9 @@
Jan Kratochvil f8eee05
 /* Define to 1 if you have the `readlink' function. */
Jan Kratochvil f8eee05
 #undef HAVE_READLINK
Jan Kratochvil f8eee05
 
Jan Kratochvil f8eee05
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
Jan Kratochvil f8eee05
+#undef HAVE_SELINUX_SELINUX_H
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
 /* Define to 1 if you have the <sgtty.h> header file. */
Jan Kratochvil f8eee05
 #undef HAVE_SGTTY_H
Jan Kratochvil f8eee05
 
Jan Kratochvil 43e595b
Index: gdb-7.5.91.20130323/gdb/gdbserver/configure
Jan Kratochvil f8eee05
===================================================================
Jan Kratochvil 43e595b
--- gdb-7.5.91.20130323.orig/gdb/gdbserver/configure	2013-03-11 09:35:09.000000000 +0100
Jan Kratochvil 43e595b
+++ gdb-7.5.91.20130323/gdb/gdbserver/configure	2013-03-23 19:50:53.305066374 +0100
Jan Kratochvil 43e595b
@@ -5911,6 +5911,64 @@ if $want_ipa ; then
Jan Kratochvil f8eee05
    fi
Jan Kratochvil f8eee05
 fi
Jan Kratochvil f8eee05
 
Jan Kratochvil f8eee05
+for ac_header in selinux/selinux.h
Jan Kratochvil f8eee05
+do :
Jan Kratochvil f8eee05
+  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
Jan Kratochvil f8eee05
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
Jan Kratochvil f8eee05
+  cat >>confdefs.h <<_ACEOF
Jan Kratochvil f8eee05
+#define HAVE_SELINUX_SELINUX_H 1
Jan Kratochvil f8eee05
+_ACEOF
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+fi
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+done
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
Jan Kratochvil f8eee05
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
Jan Kratochvil f8eee05
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
Jan Kratochvil f8eee05
+  $as_echo_n "(cached) " >&6
Jan Kratochvil f8eee05
+else
Jan Kratochvil f8eee05
+  ac_check_lib_save_LIBS=$LIBS
Jan Kratochvil f8eee05
+LIBS="-lselinux  $LIBS"
Jan Kratochvil f8eee05
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Jan Kratochvil f8eee05
+/* end confdefs.h.  */
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+/* Override any GCC internal prototype to avoid an error.
Jan Kratochvil f8eee05
+   Use char because int might match the return type of a GCC
Jan Kratochvil f8eee05
+   builtin and then its argument prototype would still apply.  */
Jan Kratochvil f8eee05
+#ifdef __cplusplus
Jan Kratochvil f8eee05
+extern "C"
Jan Kratochvil f8eee05
+#endif
Jan Kratochvil f8eee05
+char security_get_boolean_active ();
Jan Kratochvil f8eee05
+int
Jan Kratochvil f8eee05
+main ()
Jan Kratochvil f8eee05
+{
Jan Kratochvil f8eee05
+return security_get_boolean_active ();
Jan Kratochvil f8eee05
+  ;
Jan Kratochvil f8eee05
+  return 0;
Jan Kratochvil f8eee05
+}
Jan Kratochvil f8eee05
+_ACEOF
Jan Kratochvil f8eee05
+if ac_fn_c_try_link "$LINENO"; then :
Jan Kratochvil f8eee05
+  ac_cv_lib_selinux_security_get_boolean_active=yes
Jan Kratochvil f8eee05
+else
Jan Kratochvil f8eee05
+  ac_cv_lib_selinux_security_get_boolean_active=no
Jan Kratochvil f8eee05
+fi
Jan Kratochvil f8eee05
+rm -f core conftest.err conftest.$ac_objext \
Jan Kratochvil f8eee05
+    conftest$ac_exeext conftest.$ac_ext
Jan Kratochvil f8eee05
+LIBS=$ac_check_lib_save_LIBS
Jan Kratochvil f8eee05
+fi
Jan Kratochvil f8eee05
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
Jan Kratochvil f8eee05
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
Jan Kratochvil f8eee05
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
Jan Kratochvil f8eee05
+  cat >>confdefs.h <<_ACEOF
Jan Kratochvil f8eee05
+#define HAVE_LIBSELINUX 1
Jan Kratochvil f8eee05
+_ACEOF
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+  LIBS="-lselinux $LIBS"
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+fi
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
+
Jan Kratochvil f8eee05
 
Jan Kratochvil f8eee05
 
Jan Kratochvil f8eee05