summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-06-18 11:19:49 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-06-18 11:19:49 -0700
commit50547cadad2385a7757663ef05145fe7671fbb9f (patch)
tree0633ed26769950d98a21bfbafef3e288cd4b6111
parent49a8f7e0e92acb48e999229363c3ca5f815f3157 (diff)
configure: remove fallback for pre-pkg-config systems
It's been 16 years, we can rely on pkg-config files for X libraries now Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac58
2 files changed, 4 insertions, 58 deletions
diff --git a/Makefile.am b/Makefile.am
index 0bd6740..9034493 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,12 +1,12 @@
SUBDIRS = doc
-AM_CFLAGS = @XLIBS_CFLAGS@
+AM_CFLAGS = $(CWARNFLAGS) $(XLIBS_CFLAGS)
bin_PROGRAMS = xrestop
xrestop_SOURCES = xrestop.c
-xrestop_LDADD = @XLIBS_LIBS@
+xrestop_LDADD = $(XLIBS_LIBS)
EXTRA_DIST = xrestop.spec xrestop.spec.in README.md ChangeLog
diff --git a/configure.ac b/configure.ac
index 06159a0..99df638 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,67 +13,13 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-# Checks for programs.
-
-XRES_LIBS=
-
-PKG_CHECK_MODULES(X11, x11, [have_libx11pc="yes"], [have_libx11pc="no"])
-
-if test $have_libx11pc = yes; then
- PKG_CHECK_MODULES(XLIBS, x11 xres xext)
-else
-dnl **** Check for xlibs 'non pc' way ****
-AC_PATH_XTRA
-
-ALL_X_LIBS="$X_LIBS -lX11"
-
-found_xres_lib=no
-AC_CHECK_LIB(XRes, XResQueryClients, XRES_LIBS=-lXRes found_xres_lib=yes,,
- -lXext $ALL_X_LIBS)
-
-if test "x$found_xres_lib" = "xno"; then
- # Try again, overriding defaults for certain platforms
- case `uname -sr` in
- "SunOS 5"*)
- # Solaris ships libXres in /usr/openwin/sfw/lib
- save_LDFLAGS=$LDFLAGS
- SOL_XRES_LDFLAGS="-L/usr/openwin/sfw/lib -R/usr/openwin/sfw/lib"
- LDFLAGS="$LDFLAGS $SOL_XRES_LDFLAGS"
- AC_CHECK_LIB(XRes, XResQueryClientResources,
- found_xres_lib=yes XRES_LIBS="$SOL_XRES_LDFLAGS -lXRes",
- ,-lXext $ALL_X_LIBS)
- LDFLAGS="$save_LDFLAGS"
- ;;
- esac
-fi
-
-
-if test "x$found_xres_lib" = "xno"; then
- AC_MSG_ERROR([Cannot find XRes extension library])
- exit 1
-fi
-
-found_xres=no
-
-AC_CHECK_HEADER(X11/extensions/XRes.h,found_xres=yes,,[#include <X11/Xlib.h>])
-
-if test "x$found_xres" = "xno"; then
- AC_MSG_ERROR([Cannot find XRes extension headers])
- exit 1
-fi
-
-XLIBS_LIBS="$XRES_LIBS -lXext $ALL_X_LIBS"
-
-fi
+# Checks for libraries
+PKG_CHECK_MODULES(XLIBS, x11 xres xext)
# check for ncurses, fall back to curses
AC_CHECK_LIB([ncurses], [initscr],,AC_CHECK_LIB([curses], [initscr]))
AC_SEARCH_LIBS([stdscr], [tinfo])
-XLIBS_CFLAGS="$CWARNFLAGS $XLIBS_CFLAGS"
-AC_SUBST(XLIBS_CFLAGS)
-AC_SUBST(XLIBS_LIBS)
-
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T