File: configure.in

package info (click to toggle)
barcode 0.98-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,032 kB
  • ctags: 395
  • sloc: ansic: 3,317; perl: 1,676; python: 535; makefile: 187; sh: 185; awk: 79; sed: 5
file content (65 lines) | stat: -rw-r--r-- 1,616 bytes parent folder | download | duplicates (9)
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
dnl Process this file with autoconf to produce a configure script.

AC_INIT(barcode.h)
AC_PREREQ(2.12)

AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL

dnl Add "-Wall" if this is gcc
if test x$GCC = xyes; then
	CFLAGS="$CFLAGS -Wall"
fi


dnl Check for getopt and libpaper. If getopt is missing, use our version
AC_CHECK_HEADER(getopt.h, ,NO_GETOPT=-DNO_GETOPT;GETOPT_O=compat/getopt.o)
AC_CHECK_HEADER(paper.h, LIBPAPER=-lpaper, NO_LIBPAPER=-DNO_LIBPAPER)
AC_CHECK_HEADERS(unistd.h)

AC_CHECK_FUNC(strerror, , NO_STRERROR=-DNO_STRERROR)
AC_CHECK_FUNCS(strcasecmp)

dnl Check if this is gmake, but allow ovverriding using $MAKE
AC_MSG_CHECKING("for gmake")
GMAKE=no
${MAKE=make} --version 2> /dev/null | grep GNU > /dev/null && GMAKE=yes
AC_MSG_RESULT($GMAKE)
if test "$GMAKE" = "yes"; then
	GMAKEDEPEND0='ifeq (.depend,$(wildcard .depend))'
	GMAKEDEPEND1='include .depend'
	GMAKEDEPEND2='endif'
fi

dnl Check if we use makeinfo or the local texi2html tool
AC_MSG_CHECKING("if makeinfo can output html")
MAKEINFOHTML=no
${MAKEINFO=makeinfo} --help | grep .--html > /dev/null && MAKEINFOHTML=yes
AC_MSG_RESULT($MAKEINFOHTML)
if test "$MAKEINFOHTML" = "yes"; then
   REMOVEHTMLTAGS="cat"
   INFOTOHTML="$MAKEINFO --html"
else
   REMOVEHTMLTAGS="sed 's/ifnottex/ifinfo/; s/ifnotinfo/iftex/'"
   INFOTOHTML="perl texi2html -monolithic"
fi


AC_SUBST(GETOPT_O)
AC_SUBST(NO_GETOPT)
AC_SUBST(NO_LIBPAPER)
AC_SUBST(LIBPAPER)
AC_SUBST(NO_STRERROR)
AC_SUBST(GMAKEDEPEND0)
AC_SUBST(GMAKEDEPEND1)
AC_SUBST(GMAKEDEPEND2)

AC_OUTPUT(Makefile)

AC_SUBST(MAKEINFO)
AC_SUBST(REMOVEHTMLTAGS)
AC_SUBST(INFOTOHTML)

AC_OUTPUT(doc/Makefile)