File: configure.ac

package info (click to toggle)
wmclockmon 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,248 kB
  • sloc: sh: 4,360; ansic: 3,409; makefile: 126
file content (81 lines) | stat: -rw-r--r-- 2,141 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.52])

AC_INIT([wmclockmon], [1.0.0], [wmaker-dev@googlegroups.com])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([no-dist-gzip dist-xz])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])

AC_CANONICAL_HOST

dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S

AX_C___ATTRIBUTE__
AM_CONDITIONAL([HAVE___ATTRIBUTE__], [test "$ax_cv___attribute__" = "yes"])

PKG_CHECK_MODULES([gtk], [gtk+-3.0])

dnl ===========================================
dnl             Stuff that uses X
dnl ===========================================

PKG_CHECK_MODULES([x11],  [x11])
PKG_CHECK_MODULES([xext], [xext])
PKG_CHECK_MODULES([xpm],  [xpm])

dnl ===============================================
dnl             End of stuff that uses X
dnl ===============================================

dnl =========
dnl Debugging
dnl =========

AC_ARG_ENABLE([debug],
              [AS_HELP_STRING([--enable-debug], [turn on debugging [default=no]])])
AS_IF([test "$enable_debug" = yes], [
  debug_CPPFLAGS="-D_XOPEN_SOURCE=700 -DGTK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED"
  debug_CFLAGS="-Wall -Wextra -std=c11 -pedantic"
  AC_DEFINE([DEBUG], [1], [use debug code])
])
AC_SUBST([debug_CPPFLAGS])
AC_SUBST([debug_CFLAGS])


dnl ============
dnl Check for OS
dnl ============

AS_CASE([${host_os}],
        [freebsd*], [
          LIBS="$LIBS -lkvm"
          SETGID_FLAGS="-g kmem -m 2755 -o root"
        ],
        [linux*|netbsd*|openbsd*|solaris*], [],
        [AC_MSG_ERROR([Sorry, ${host_os} is not supported yet])])
AC_SUBST([SETGID_FLAGS])

dnl Checks for header files.
AC_CHECK_HEADERS([fcntl.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

dnl Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([select strtoul uname])

AC_CONFIG_FILES([Makefile
		 doc/Makefile
		 src/Makefile
		 styles/Makefile
		 wmclockmon-config/Makefile
		 wmclockmon-cal/Makefile])
AC_OUTPUT