summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2005-05-25 21:47:56 +0000
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2005-05-25 21:47:56 +0000
commit207e3f82011d5f83db0eca318a1de50f0c1da0dc (patch)
treee169645f0f66370846f1ed22fe243b44e5d5fa24
parenta5a4bfe9b432e7d8238f9a02d80be4ce6bb64978 (diff)
- Add FSlib to symlink.sh
- Change Xtrans includedir back to be X11/Xtrans, so that users of it can continue to include <X11/*> - Add build system for FSlib - Conditionally include config.h in xc/lib/FS - Remove redundant include of FSproto.h in xc/lib/FS - Add check to proto/X11/configure.ac whether -D_XOPEN_SOURCE is needed.
-rw-r--r--configure.ac38
-rw-r--r--xproto.pc.in2
2 files changed, 39 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 505406b..580d19a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,44 @@
AC_PREREQ([2.57])
AC_INIT([Xproto], [7.0], [xorg@lists.freedesktop.org])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
+#
+PROTO_DEFINES=
+
+
+# Find out what defines are necessary to make struct fd_set contain
+# fds_bits
+#
+
+fds_bits_found=false;
+
+# No defines necessary?
+if test x$fds_bits_found = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.fds_bits,
+ [
+ fds_bits_found=true
+ ],,
+ [
+ #include <sys/select.h>
+ ])
+fi
+
+# With _XOPEN_SOURCE?
+
+unset ac_cv_member_fd_set_fds_bits
+
+if test x$fds_bits_found = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.fds_bits,
+ [
+ fds_bits_found=true
+ PROTO_DEFINES="$PROTO_DEFINES -D_XOPEN_SOURCE"
+ ],,
+ [
+ #define _XOPEN_SOURCE
+ #include <sys/select.h>
+ ])
+fi
+
+AC_SUBST(PROTO_DEFINES)
AC_OUTPUT([Makefile
xproto.pc])
diff --git a/xproto.pc.in b/xproto.pc.in
index a95c1a3..834a98e 100644
--- a/xproto.pc.in
+++ b/xproto.pc.in
@@ -6,4 +6,4 @@ includedir=@includedir@
Name: Xproto
Description: Xproto headers
Version: @PACKAGE_VERSION@
-Cflags: -I${includedir} -D_XOPEN_SOURCE=500
+Cflags: -I${includedir} @PROTO_DEFINES@