File: configure.ac

package info (click to toggle)
wininfo 0.7-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,632 kB
  • ctags: 1,348
  • sloc: ansic: 10,170; sh: 9,245; makefile: 440; yacc: 288
file content (83 lines) | stat: -rw-r--r-- 2,067 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(wininfo, 0.7, http://freedesktop.org/)
AC_COPYRIGHT([Copyright 2004 Billy Biggs])
AC_CONFIG_SRCDIR([src/wininfo.c])
AM_INIT_AUTOMAKE()
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST

AC_PROG_CC
AC_PROG_LIBTOOL

AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])

AM_GNU_GETTEXT

PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

# Check for XRes, from xrestop's configure.ac
# ===========================================
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
AC_SUBST(XLIBS_CFLAGS)
AC_SUBST(XLIBS_LIBS)


AC_CONFIG_FILES([
	Makefile
	docs/Makefile
	src/Makefile
	intl/Makefile
	po/Makefile.in
	m4/Makefile
])
AC_OUTPUT