summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-13 09:11:20 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-15 22:38:05 -0700
commit800f55f8dcd195dd0cdfc1c4d7487d00bb7745f4 (patch)
treef9d79fc3bf4fbfdac16a30751831e3fe43addb1b
parent445863f8b5059692ac7a4df785af6920849faa82 (diff)
Replace hardcoded _XOPEN_SOURCE=500 with AC_USE_SYSTEM_EXTENSIONS
-D_XOPEN_SOURCE was originally added for Linux in commit e751086392e837 and then updated to -D_XOPEN_SOURCE=500 in commit e1a002217cabdb to expose strdup() in glibc headers. As noted in bug 47792 though, the posix_openpt() function is not visible unless that's raised to 600. Instead of continually chasing the standards ourselves, switch to letting autoconf handle that for us. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac13
2 files changed, 2 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 8069670..ef042e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,6 @@ bin_PROGRAMS = luit
AM_CFLAGS = \
$(CWARNFLAGS) \
$(LUIT_CFLAGS) \
- $(OS_CFLAGS) \
-DLOCALE_ALIAS_FILE=\"$(LOCALEALIASFILE)\"
luit_LDADD = $(LUIT_LIBS)
diff --git a/configure.ac b/configure.ac
index 946db23..0ec4664 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_INIT([luit], [1.1.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [luit])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
+AC_USE_SYSTEM_EXTENSIONS
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -37,9 +38,6 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-AC_CANONICAL_HOST
-
-
AC_CHECK_HEADERS([pty.h stropts.h sys/param.h sys/select.h])
AC_CHECK_FUNCS([select grantpt posix_openpt])
@@ -57,23 +55,16 @@ PKG_CHECK_MODULES(LUIT, fontenc)
PKG_CHECK_EXISTS(x11, [],
[AC_MSG_WARN([libX11 not found. luit may not be able to find locale aliases without it.])])
+AC_CANONICAL_HOST
case $host_os in
# darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
darwin*)
- OS_CFLAGS=
- ;;
- linux*)
- AC_CHECK_HEADERS([poll.h])
- AC_CHECK_FUNCS([poll])
- OS_CFLAGS="-D_XOPEN_SOURCE=500"
;;
*)
AC_CHECK_HEADERS([poll.h])
AC_CHECK_FUNCS([poll])
- OS_CFLAGS=
;;
esac
-AC_SUBST(OS_CFLAGS)
AC_CHECK_HEADERS([pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.h])
AC_CHECK_FUNCS([grantpt putenv select strdup])