File: configure.in

package info (click to toggle)
gnucash-docs 1.8.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,048 kB
  • ctags: 1,014
  • sloc: xml: 32,234; sh: 6,787; makefile: 151; ansic: 120
file content (185 lines) | stat: -rw-r--r-- 5,262 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
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
# copyright (c) 2000-2002 Chris Lyttle

dnl Process this file with autoconf to produce a configure script.
AC_INIT(gnucash-docs.spec.in)

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 ==========================================================================

SCROLLKEEPER_BUILD_REQUIRED=0.3.4
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)

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

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

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

dnl ====================================
dnl = Begin tests for scrollkeeper
dnl ====================================
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
fi
dnl ====================================
dnl = End tests for scrollkeeper
dnl ====================================

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnucash-docs,1.8.5)
AM_PROG_LIBTOOL

dnl
dnl Check for xsltproc
dnl
AC_PATH_PROG(XSLTPROC, xsltproc)
if test -z "$XSLTPROC"; then
  AC_MSG_ERROR([xsltproc not found])
fi

### --------------------------------------------------------------------------
### Check for perl

# Check for perl, force version 5
AC_ARG_WITH(perl,
  [  --with-perl=FILE             which perl executable to use ],
  PERL="${with_perl}")

# If the user didn't specify a perl, then go fetch.
if test x"$PERL" = x;
then
  AC_PATH_PROG(PERL, perl)
fi

# Make sure Perl was found
if test x"$PERL" = x || test x"$PERL" = xno ; then
    AC_MSG_ERROR([Cannot find Perl. Try using the --with-perl flag.])
fi

# Make sure it's version 5 or later
if "$PERL" -e 'exit 1 if $] < 5.0'; then
	:
else
    AC_MSG_ERROR([Found ${PERL} reports version ]
                 [`${PERL} -e 'print $]'`, need version 5.*])
fi
AC_SUBST(PERL)

# Now check for perl headers
# This appears to be what Perl's
# ExtUtils::MakeMaker module does, so
# I'm reasonably sure it's correct.
# PERLINCL="/usr/lib/perl5/i386-linux/5.00404"
#
PERLINCL=`$PERL -MConfig -e 'print $Config{"archlibexp"}'`
AC_ARG_WITH( perl-includes,
   [  --with-perl-includes=DIR     specify where to look for perl includes],
        PERLINCL="$with_perl_includes" )
AC_SUBST(PERLINCL)

### --------------------------------------------------------------------------
### Berkeley db

AC_ARG_ENABLE(prefer-db1,
  [  --enable-prefer-db1          Prefer Berkeley DB
1.x],[prefer_db1="$enableval"],[prefer_db1=yes])

DB_LIBS=
AC_CHECK_FUNC(dbopen, [],
if test "$prefer_db1" = "yes"; then
 AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
  AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
   AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
    AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
     AC_CHECK_LIB(db-4.1, __db185_open, DB_LIBS="-ldb-4.1",
      AC_CHECK_LIB(db-4.2, __db185_open, DB_LIBS="-ldb-4.2",
       AC_CHECK_LIB(db, __db185_open, DB_LIBS="-ldb",
        AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
       )
      )
     )
    )
   )
  )
 )
else
 AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
  AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
   AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
    AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
     AC_CHECK_LIB(db-4.1, __db185_open, DB_LIBS="-ldb-4.1",
      AC_CHECK_LIB(db-4.2, __db185_open, DB_LIBS="-ldb-4.2",
       AC_CHECK_LIB(db, __db185_open, DB_LIBS="-ldb",
        AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
       )
      )
     )
    )
   )
  )
 )
fi
)

dnl look for db headers
if test "$prefer_db1" = "yes"; then
	AC_CHECK_HEADERS(db_185.h db1/db.h db4/db_185.h)
	if test "$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nonono; then
	  AC_MSG_ERROR([Berkeley db library required for GnuCash])
	fi
	AC_DEFINE(PREFER_DB1)
else
	AC_CHECK_HEADERS(db.h db_185.h db1/db.h db4/db_185.h)

	if test "$ac_cv_header_db_h$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nononono;
then
	  AC_MSG_ERROR([Berkeley db library required for GnuCash])
	fi
fi

AC_SUBST(DB_LIBS)

AC_OUTPUT(
gnucash-docs.spec
doc-tools/Makefile
help/Makefile
help/C/Makefile
help/de_DE/Makefile
guide/Makefile
guide/C/Makefile
guide/de_DE/Makefile
Makefile)