File: configure.in

package info (click to toggle)
scrollkeeper 0.3.14-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,876 kB
  • ctags: 1,044
  • sloc: sh: 10,794; ansic: 9,679; xml: 1,233; makefile: 628; yacc: 316; perl: 38; sed: 16
file content (295 lines) | stat: -rw-r--r-- 9,189 bytes parent folder | download | duplicates (3)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# copyright (c) 2000 Sun Microsystems, Inc.

dnl Process this file with autoconf to produce a configure script.
AC_INIT(libs/error.c)

dnl ==========================================================================
dnl
dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!
dnl
dnl ==========================================================================

dnl ==========================================================================

dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC

AC_ISC_POSIX

AC_CANONICAL_SYSTEM

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(scrollkeeper,0.3.14)
AM_PROG_LIBTOOL
AC_PROG_INTLTOOL([0.28])

ALL_LINGUAS="am az be ca cs da de el es fr hu it ja kn ko nl no pl pt_BR ro ru sk sl sr sr@Latn sv tr uk vi zh_CN zh_TW"

dnl ====================================
dnl = Begin checks for typedefs, structures, and compiler characteristics.
dnl ====================================
AC_C_CONST
dnl ====================================
dnl = End checks for typedefs, structures, and compiler characteristics.
dnl ====================================

dnl ====================================
dnl = Begin checks for library functions.
dnl ====================================
AC_CHECK_FUNCS(getcwd getwd putenv strdup)
dnl ====================================
dnl = End checks for library functions.
dnl ====================================

dnl ====================================
dnl = Check for paths to search for OMF files.
dnl ====================================
AC_MSG_CHECKING(for --with-omfdirs)
AC_ARG_WITH(omfdirs, dnl
[  --with-omfdirs          colon-seperated paths to search for OMF files])

if test -z "$with_omfdirs"
then
        with_omfdirs="/usr/share/omf:/usr/local/share/omf:/opt/gnome/share/omf:/opt/gnome-2.0/share/omf:/opt/kde/omf"
fi
OMFDIRS=$with_omfdirs
AC_MSG_RESULT($OMFDIRS)
AC_SUBST(OMFDIRS)
dnl ====================================
dnl = End check for paths to search for OMF files.
dnl ====================================

dnl ====================================
dnl = Begin tests for libxml2
dnl ====================================
AC_PATH_PROG(XML_CONFIG,xml2-config,no)
if test x$XML_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find xml2-config please install the libxml2 and libxml2-devel packages)
fi
AC_MSG_CHECKING(libxml2 version)
libxml2_version=`$XML_CONFIG --version | awk '{print $1;}'`
AC_MSG_RESULT($libxml2_version)
libxml2_version=`echo $libxml2_version | awk -F. '{print $1 * 10000 + $2 * 100 + $3;}'`
if test 0$libxml2_version -lt 20419; then
        AC_MSG_ERROR(libxml2 2.4.19 or later required)
fi
XML_LIBS=`$XML_CONFIG --libs`
XML_CFLAGS=`$XML_CONFIG --cflags`
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
LIBXML2_REQUIRED=2.4.19
AC_SUBST(LIBXML2_REQUIRED)
dnl ====================================
dnl = End tests for libxml2
dnl ====================================

dnl ====================================
dnl = Begin tests for libxslt
dnl ====================================
AC_PATH_PROG(XSLT_CONFIG,xslt-config,no)
if test x$XSLT_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find xslt-config please install the libxslt package)
fi
XSLT_LIBS=`$XSLT_CONFIG --libs`
XSLT_CFLAGS=`$XSLT_CONFIG --cflags`
AC_SUBST(XSLT_LIBS)
AC_SUBST(XSLT_CFLAGS)
dnl ====================================
dnl = End tests for libxslt
dnl ====================================

dnl
dnl Some systems have the XML catalog in different locations from others
dnl (particularly those acting as servers for huge networked setups). Usually,
dnl /etc/xml/catalog is correct (and depending on $prefix is always wrong), but
dnl we allow customisation if it is wanted.
dnl

default_xml_catalog="/etc/xml/catalog"
AC_MSG_CHECKING(which XML catalog to use)
AC_ARG_WITH(xml-catalog,
   [AC_HELP_STRING([--with-xml-catalog], [The location of the system XML catalog])],
   [xml_catalog="$withval"],
   [xml_catalog="auto"])

   case "$xml_catalog" in
   yes | no)
      AC_MSG_ERROR([Specifying --with-xml-catalog requires a subdirectory as an argument.])
      ;;
   auto)
      XML_CATALOG=$default_xml_catalog
      ;;
   *)
      XML_CATALOG=$xml_catalog
   esac
AC_SUBST(XML_CATALOG)
AC_MSG_RESULT($XML_CATALOG)

dnl ====================================
dnl = Begin tests for DocBook XML DTD
dnl ====================================
case "$host_os" in
   solaris*)
	HOST_TYPE=-DSOLARIS
	AC_SUBST(HOST_TYPE)
        ;;
   *)
	AC_MSG_CHECKING(for DocBook XML DTD)
	db_found=
	for vers in 4.2 4.1.2; do
	   if xmlcatalog $XML_CATALOG "-//OASIS//DTD DocBook XML V$vers//EN" >/dev/null ; then
	      db_found=$vers
	      break
	   fi
	done
	if test -z $db_found; then
	   AC_MSG_ERROR(not found. Make sure you have the DocBook DTD installed and ensure that it is registered in $XML_CATALOG.)
	fi
	AC_MSG_RESULT(found version $vers)
	AC_DEFINE_UNQUOTED(DB_PUBLIC_ID, "-//OASIS//DTD DocBook XML V$db_found//EN", [Public identifier for the DocBook DTD])
	AC_DEFINE_UNQUOTED(DB_SYSTEM_ID, "http://www.oasis-open.org/docbook/xml/$db_found/docbookx.dtd", [System identifier for the DocBook DTD])
	;;
esac
dnl ====================================
dnl = End tests for DocBook XML DTD
dnl ====================================

AM_GNU_GETTEXT
AC_SUBST(LTLIBINTL)
AC_SUBST(LIBINTL)
GETTEXT_PACKAGE=scrollkeeper
AC_SUBST(GETTEXT_PACKAGE)

if test "x$prefix" = "xNONE"; then
   SKLOCALEDIR=$ac_default_prefix/${DATADIRNAME}/locale
else
   SKLOCALEDIR=$prefix/${DATADIRNAME}/locale
fi
AC_DEFINE_UNQUOTED(SCROLLKEEPERLOCALEDIR, "$SKLOCALEDIR", [The locale dir to use])

dnl Turn on more warnings and make them errors for cvs version
dnl to force contributors to pay attention to warnings.
AC_ARG_ENABLE(more-warnings,
[  --enable-more-warnings  Maximum compiler warnings],
set_more_warnings="$enableval",[
if test -f $srcdir/CVSVERSION; then
        set_more_warnings=yes
else
        set_more_warnings=no
fi
])

if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
        echo "enable compile warnings = $set_more_warnings"
        CFLAGS="$CFLAGS \
        -Wall \
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
        -Wnested-externs -Wpointer-arith"

        for option in -Wsign-promo -Wno-sign-compare; do
                SAVE_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $VFS_CFLAGS $option"
                AC_MSG_CHECKING([whether gcc understands $option])
                AC_TRY_COMPILE([], [],
                        has_option=yes,
                        has_option=no,)
                CFLAGS="$SAVE_CFLAGS"
                if test $has_option = yes; then
                  VFS_CFLAGS="$VFS_CFLAGS $option"
                fi
                AC_MSG_RESULT($has_option)
                unset has_option
                unset SAVE_CFLAGS
        done
        unset option
fi

dnl
dnl The "partial database directory" is the last portion of the directory path
dnl to the Scrollkeeper database. The database will always go under
dnl $localstatedir (typically /var/), but the last bit is OS dependent. We
dnl make a few good guesses here and provide customisation as an option if all
dnl else fails.
dnl
AC_MSG_RESULT(setting up partial database directory ...)
default_partial_db_dir="lib/scrollkeeper"
AC_ARG_WITH(partial-db-dir,
   [AC_HELP_STRING([--with-partial-db-dir], [The subdirectory under localstatedir to put the scrollkeeper database (lib/scrollkeeper by default).])],
   [partial_db_dir="$withval"],
   [partial_db_dir="auto"])

   case "$partial_db_dir" in
   yes | no)
      AC_MSG_ERROR([Specifying the --with-partial-db-dir flag requires a subdirectory as an argument.])
      ;;
   auto)
      case "$host_os" in
      freebsd* | netbsd* | openbsd*)
   	SCROLLKEEPER_PARTIAL_DB_DIR=db/scrollkeeper
   	;;
      *)
        SCROLLKEEPER_PARTIAL_DB_DIR=lib/scrollkeeper
   	;;
      esac
      ;;
   *)
      SCROLLKEEPER_PARTIAL_DB_DIR=$partial_db_dir
      ;;
   esac
AC_SUBST(SCROLLKEEPER_PARTIAL_DB_DIR)
AC_MSG_RESULT(partial database directory is $SCROLLKEEPER_PARTIAL_DB_DIR)

AC_OUTPUT(
libs/Makefile
libuuid/Makefile
buildtools/Makefile
cl/Makefile
cl/src/Makefile
cl/templates/Makefile
extract/Makefile
extract/src/Makefile
extract/stylesheets/Makefile
extract/dtds/Makefile
scripts/scrollkeeper-config
scripts/scrollkeeper-get-content-list
scripts/scrollkeeper-get-extended-content-list
scripts/scrollkeeper-get-toc-from-id
scripts/scrollkeeper-get-toc-from-docpath
scripts/scrollkeeper-get-index-from-docpath
scripts/scrollkeeper-rebuilddb
scripts/Makefile
man/Makefile
man/man1/Makefile
man/man5/Makefile
man/man7/Makefile
man/man8/Makefile
config/scrollkeeper.conf
config/Makefile
intl/Makefile
m4/Makefile
po/Makefile.in
doc/Makefile
doc/writing_scrollkeeper_omf_files/Makefile
doc/writing_scrollkeeper_omf_files/C/Makefile
Makefile
scrollkeeper.spec)

AC_MSG_NOTICE([
   Default OMF search paths (in $sysconfdir/scrollkeeper.conf):
      $OMFDIRS

   Scrollkeeper database directory:
      $localstatedir/$SCROLLKEEPER_PARTIAL_DB_DIR

   Now type 'make' to build scrollkeeper.])