File: configure.ac

package info (click to toggle)
liblouisutdml 2.7.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,248 kB
  • sloc: ansic: 19,545; java: 369; makefile: 334; xml: 252; sh: 104
file content (152 lines) | stat: -rw-r--r-- 4,148 bytes parent folder | download | duplicates (2)
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
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.68)
AC_INIT([liblouisutdml], [2.7.0], [liblouis-liblouisxml@freelists.org], [liblouisutdml], [http://www.liblouis.org])
AC_CONFIG_SRCDIR([liblouisutdml/semantics.c])
AC_CONFIG_HEADER([liblouisutdml/config.h])

AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE

# increment if the interface has additions, changes, removals.
LIBLOUISUTDML_CURRENT=8

# increment any time the source changes; set to
# 0 if you increment CURRENT
LIBLOUISUTDML_REVISION=0

# increment if any interfaces have been added; set to 0
# if any interfaces have been changed or removed. removal has
# precedence over adding, so set to 0 if both happened.
LIBLOUISUTDML_AGE=0

AC_SUBST(LIBLOUISUTDML_CURRENT)
AC_SUBST(LIBLOUISUTDML_REVISION)
AC_SUBST(LIBLOUISUTDML_AGE)

# Checks for programs.
AC_PROG_CC

# gnulib
gl_EARLY
gl_INIT

# Checks for more programs.
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# AC_PROG_RANLIB
AC_ISC_POSIX
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

# GNU help2man creates man pages from --help output; in many cases,
# this is sufficient, and obviates the need to maintain man pages
# separately. However, some developers do not have it so we do not
# make its use mandatory.
AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man])

AC_PATH_PROG(PKG_CONFIG, pkg-config)

PKG_CHECK_MODULES(BASE_DEPENDENCIES, [liblouis >= 3.0.0, libxml-2.0])

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([memset])

case $host in
 *mingw* | *cygwin*)
 LDFLAGS="$LDFLAGS -avoid-version"
 CFLAGS="$CFLAGS -Wl,--add-stdcall-alias"
 ;;
esac

# Disable building the Java bindings on request
AC_ARG_ENABLE(
	[java_bindings], 
	[  --disable-java-bindings do not build the Java bindings],
	[case "${enableval}" in
	      yes) java_bindings=yes ;;
	      no)  java_bindings=no ;;
	      *) AC_MSG_ERROR([bad value ${enableval} for --disable-java-bindings]) ;;
	esac],[java_bindings=yes])
AM_CONDITIONAL([JAVA_BINDINGS], [test x$java_bindings == xyes])
AC_MSG_CHECKING([whether Java bindings should be built])
AC_MSG_RESULT($java_bindings)

if test x$java_bindings == xyes ; then

   # make sure jni include dirs are found
   # using a macro from the autoconf archive
   AX_JNI_INCLUDE_DIR

   for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
       do
           CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
	   found_jni_h=yes
       done
fi

if test x$java_bindings == xyes -a x$found_jni_h != xyes ; then
    AC_MSG_ERROR([Please install jni properly or disable the Java bindings with --disable-java-bindings.])
fi

AC_CONFIG_FILES([Makefile
	gnulib/Makefile
	doc/Makefile
	java/Makefile
	java/lib/Makefile
	java/src/Makefile
	java/src/org/Makefile
	java/src/org/liblouis/Makefile
	java/tests/Makefile
	java/tests/org/Makefile
	java/tests/org/liblouis/Makefile
	java/testdata/Makefile
	java/testdata/liblouis/Makefile
	java/testdata/liblouis/tables/Makefile
	java/testdata/liblouisutdml/Makefile
	java/testdata/liblouisutdml/lbu_files/Makefile
	man/Makefile
	lbu_files/Makefile
	liblouisutdml/Makefile
	liblouisutdml.pc
	tests/Makefile
	tests/test_suite/Makefile
	tests/test_suite/test_01/Makefile
	tests/test_suite/test_02/Makefile
	tests/test_suite/test_03/Makefile
	tests/test_suite/test_04/Makefile
	tests/test_suite/test_05/Makefile
	tests/test_suite/test_06/Makefile
	tests/test_suite/test_07/Makefile
	tests/test_suite/test_08/Makefile
	tests/test_suite/test_09/Makefile
	tests/test_suite/test_10/Makefile
	tests/test_suite/test_11/Makefile
	tests/test_suite/test_12/Makefile
	tests/test_suite/test_13/Makefile
	tests/test_suite/test_14/Makefile
	tools/Makefile
	windows/Makefile
	windows/include/Makefile
	m4/Makefile])

# generate the shell script to run the test suite and make sure it is executable
AC_CONFIG_FILES([tests/run_test_suite.sh], [chmod +x tests/run_test_suite.sh])

AC_OUTPUT