File: configure.ac

package info (click to toggle)
xcowsay 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,264 kB
  • sloc: sh: 4,778; ansic: 1,667; makefile: 22; sed: 16
file content (66 lines) | stat: -rw-r--r-- 1,739 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
AC_INIT([xcowsay], [1.6],
        [Nick Gasson <nick@nick.me.uk>],
        [xcowsay])
AC_PREREQ([2.63])

dnl Automake 1.11 does not support the serial-tests option
dnl Remove this when 1.11 no longer in common use
m4_define([serial_tests], [
  m4_esyscmd([
    automake --version |
      head -1 |
      awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
  ])
])

AM_INIT_AUTOMAKE([1.11 -Wall -Wno-extra-portability color-tests] serial_tests)

# Check for programs
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_CPP
AC_PROG_MKDIR_P

# Checks for libraries.

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h limits.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([strtol setlocale strcasecmp strdup strchr \
                getcwd strerror realpath])

# Check for pkg-config packages
modules="gtk+-3.0 gdk-3.0"
xcowsayd_modules="$modules dbus-glib-1 gthread-2.0"
AC_ARG_ENABLE(dbus,
        [AS_HELP_STRING([--enable-dbus], [Build the DBus daemon.])],
        [if test "$enableval" = "yes" ; then
           modules="$xcowsayd_modules"
           CFLAGS="$CFLAGS -DWITH_DBUS"
         fi
	 AC_FUNC_FORK])

PKG_CHECK_MODULES(XCOWSAY, $modules)

# Not sure why autoconf doesn't define this itself
pkgdatadir=$datadir/xcowsay

AX_DEFINE_DIR([DATADIR], [pkgdatadir], [Location of data files])
AX_DEFINE_DIR([LOCALEDIR], [localedir], [Location of locale files])

AC_CONFIG_HEADERS([config.h])
AC_OUTPUT([Makefile src/Makefile po/Makefile.in])