File: configure.ac

package info (click to toggle)
splashy 0.3.13-3+lenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,796 kB
  • ctags: 346
  • sloc: sh: 10,502; ansic: 4,538; makefile: 120; xml: 106; perl: 20
file content (120 lines) | stat: -rw-r--r-- 3,756 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
dnl $Revision:  $
dnl Process this file with autoconf to produce a configure script.

AC_INIT([splashy], [0.3.13], [splashy-devel@alioth.debian.org])
AC_CONFIG_SRCDIR(src/splashy_main.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([splashy], [0.3.13], [splashy-devel@alioth.debian.org])

AC_PREREQ(2.59)
AC_LANG_C
AC_PROG_CC
AC_PROG_INSTALL

#AC_ENABLE_STATIC
# when using STATIC, comment the following line (and uncomment the previous one):
AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AC_PROG_LN_S

# Splashy goes international!
GETTEXT_PACKAGE=splashy
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package Name for Gettext])
# languages that we support:
ALL_LINGUAS="es sk fr de hu pt" 
AM_GLIB_GNU_GETTEXT([external])
AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)

# Check library magic existence and its use
AC_CHECK_HEADER([magic.h], [
    AC_CHECK_LIB(magic, magic_open, [
        WITH_MAGIC_SUBDIR=
        WITH_MAGIC_INCLUDE=
        WITH_MAGIC_LIB="-lmagic"
    ])
])

PKG_CHECK_MODULES(splashy, [glib-2.0, directfb >= 0.9.22])
PKG_CHECK_MODULES(splashy_config, [glib-2.0])

# EXTRA ARGS #
# Add an --enable-debug option to turn on DEBUG_PRINT statements
AH_TEMPLATE(DEBUG,[Define to enable debugging messages])
AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[enable debugging messages]),AC_DEFINE(DEBUG))
# END EXTRA ARGS

# All warnings are errors.
# when in --enable-debug mode, we need to enable assert in glib...
if test x$enable_debug = x1; then
    CFLAGS="$CFLAGS -Wall -Werror"
else
    CFLAGS="$CFLAGS -Wall -Werror -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
fi

# we used to compile splashy statically
AC_SUBST(splashy_LIBS)
AC_SUBST(splashy_CFLAGS)
# other binaries
AC_SUBST(splashy_config_LIBS)
AC_SUBST(splashy_config_CFLAGS)
AC_SUBST(splashy_update_LIBS)
AC_SUBST(splashy_update_CFLAGS)

#
# We need to get expanded versions of a bunch of things
# stolen mostly from gdm
#

SYSCONFDIR_TMP="$sysconfdir"
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP | sed s/NONE//`
AC_DEFINE([EXPANDED_SYSCONFDIR], [$EXPANDED_SYSCONFDIR], [our system configuration directory])
AC_SUBST(EXPANDED_SYSCONFDIR)

DFB_VERSION=`eval  directfb-config --version`
AC_DEFINE([DFB_VERSION], [$DFB_VERSION], [directfb version])
AC_SUBST(DFB_VERSION)

DFB_LIBDIR="$(eval pkg-config directfb-internal --variable=moduledir)"
AC_DEFINE([DFB_LIBDIR], [$DFB_LIBDIR], [directfb libdir])
AC_SUBST(DFB_LIBDIR)

# If doing an -all-static, you will need to define which keyboard driver
# imageprovider and font you want compiled-in and you will need
# to modify src/Makefile.am where it says "STATIC"
# sample options to include to directfb-config below (before ' | sed ...'):
#--input=keyboard --imageprovider=png --font=ft2,default 
DFB_LIBS="$(eval directfb-config --libs | sed 's/$/ \\/')"
#AC_DEFINE([DFB_LIBS], [$DFB_LIBS], [directfb libs])
AC_SUBST(DFB_LIBS)

# TODO slurp the doc/*.xml.in or .xml files and create xml_format.h
# EXPANDED_XML_CONFIG_FORMAT="`cat doc/config.xml`"
# AC_DEFINE([EXPANDED_XML_CONFIG_FORMAT], [$EXPANDED_XML_CONFIG_FORMAT], [our xml configuration])
# AC_SUBST(EXPANDED_XML_CONFIG_FORMAT)
# 
# EXPANDED_XML_THEME_FORMAT="`cat doc/theme.xml`"
# AC_DEFINE([EXPANDED_XML_THEME_FORMAT], [$EXPANDED_XML_THEME_FORMAT], [our theme configuration])
# AC_SUBST(EXPANDED_XML_THEME_FORMAT)

AC_OUTPUT( po/Makefile.in
          Makefile 
          src/Makefile 
          src/xml_format.h
          doc/Makefile 
          doc/config.xml
          doc/theme.xml
          scripts/Makefile 
          scripts/initramfs-tools/hooks/libsplashy
          Doxyfile
          splashy.pc
          )

echo
echo $PACKAGE $VERSION
echo
echo Print debugging messages...... : $enable_debug
echo
echo configure complete, now type \'make\'
echo