File: configure.ac

package info (click to toggle)
gpr 0.12deb1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,568 kB
  • ctags: 250
  • sloc: sh: 6,138; ansic: 3,684; makefile: 86; sed: 16
file content (134 lines) | stat: -rw-r--r-- 3,427 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
dnl Process this file with autoconf to produce a configure script.

AC_INIT(gpr,1,mennucc1@debian.org)
AM_INIT_AUTOMAKE(gpr, 0.12deb)

AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR([config.h.in])

dnl AM_PROG_CC_STDC
dnl

WARNS=""
AC_ARG_ENABLE(debug, 
  [  --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],
WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wshadow -O0 -g")
AC_SUBST(WARNS)

dnl CFLAGS="$CFLAGS -I/usr/include/libppd"
dnl AC_ARG_ENABLE(local-libppd, 
dnl  [ --enable-local-libppd specify the local paths to libppd],
dnl  [ # This is passed into the automake process 
dnl    LIBPPD_LIBS="${enableval}/libppd.la"
dnl    LIBPPD_INCLUDES="-I${enableval}"
dnl  ],[
dnl    LIBPPD_LIBS=""
dnl  ]
dnl )
dnl AC_SUBST(LIBPPD_LIBS)
dnl AC_SUBST(LIBPPD_INCLUDES)


AC_PROG_CC
AC_HEADER_STDC

dnl Use -Wall if we have gcc.
dnl changequote(,)dnl
if test "x$GCC" = "xyes"; then
 CFLAGS="$CFLAGS -Wall" ;
fi
dnl changequote([,])dnl


dnl AM_PROG_LIBTOOL
dnl AC_ISC_POSIX

dnl Pick up the Gnome macros.
dnl AM_ACLOCAL_INCLUDE(macros)
dnl GNOME_INIT
dnl GNOME_COMPILE_WARNINGS
dnl GNOME_X_CHECKS

dnl libgnomeui-2.0 
gnome_modules="gtk+-2.0 >= 2.6.0"

PKG_CHECK_MODULES(GNOME, [$gnome_modules])

dnl Add the languages which your application supports here.
ALL_LINGUAS="fr sv"
AM_GNU_GETTEXT([external])

GETTEXT_PACKAGE=gpr
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[ the gettext environment
])

dnl Set PACKAGE_LOCALE_DIR in config.h.
dnl Subst PACKAGE_PIXMAPS_DIR.
dnl Subst PACKAGE_SCRIPTS_DIR.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/share/locale",[locale directory])
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/share/locale",[locale directory])
fi

dnl AC_DEFINE([HAVE_LIBSM], [], [fixme])

dnl Check for libraries
# if the --enable-local-libppd was passed in assume that the 
# the person who is building this knows what they are doing and
# skip the test to make sure that the header file and lib is 
# actually installed.
dnl if test -z "${LIBPPD_LIBS}"; then
 SAVECFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $GNOME_CFLAGS"

 SAVECPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $GNOME_CFLAGS"

 AC_MSG_WARN([ "(Using CFLAGS='"$CFLAGS"' for the following tests)" ])

  AC_CHECK_HEADERS(ppd.h,,[
    AC_MSG_ERROR(Must have ppd.h header to compile gpr)])

  AC_CHECK_LIB(ppd,ppd_file_new,,[
    AC_MSG_ERROR(Must have libppd installed to compile gpr)])

  AC_CHECK_HEADERS(popt.h,,[
    AC_MSG_ERROR(Must have popt.h header to compile gpr)])

if false ; then
 AC_CHECK_LIB(xml,xmlGetProp,,[
  AC_MSG_ERROR(Must have libxml installed to compile gpr)])

 AC_CHECK_HEADERS(xml,xmlGetProp,,[
  AC_MSG_ERROR(Must have libxml installed to compile gpr)])
elif false ; then
 AC_CHECK_LIB(xml2,xmlGetProp,,[
  AC_MSG_ERROR(Must have libxml2 installed to compile gpr)])
else
 AC_DEFINE(HAVE_LIBXML, 0,[use xml code from libxml version 1 ] )
 AM_CONDITIONAL(COND_XML, false )
fi




 CFLAGS="$SAVECFLAGS"
 CPPFLAGS="$SAVECPPFLAGS"

dnl loads in the magic pixie dust for the m4 files
dnl TESTSCRIPTS=`cd src/tests && echo *.m4 | sed "s/m4/sh/g"`
dnl AC_SUBST(TESTSCRIPTS)

dnl macros/Makefile

AC_OUTPUT([ 
po/Makefile.in 
Makefile
src/Makefile
pixmaps/Makefile
])

#gpr.spec