File: configure.ac

package info (click to toggle)
libticalcs3 3.3.5-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,824 kB
  • ctags: 1,880
  • sloc: ansic: 18,809; sh: 9,396; makefile: 349; sed: 93
file content (106 lines) | stat: -rw-r--r-- 2,690 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
dnl Process this file with autoconf to produce a configure script.

dnl Init autoconf
AC_INIT(src/intrface.c)
AC_PREREQ(2.52)

dnl Set library version number
dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
MAJOR_VERSION=3
MINOR_VERSION=3
MICRO_VERSION=5
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
dnl AC_DIVERT_POP()

dnl Pass variables
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(MICRO_VERSION)
AC_SUBST(VERSION)

dnl libtool versioning
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MINOR_VERSION + $MAJOR_VERSION`
LT_REVISION=$MICRO_VERSION
LT_AGE=$MINOR_VERSION
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

dnl Determine the system type
AC_CANONICAL_SYSTEM
dnl Determine the host type
dnl AC_CANONICAL_HOST

dnl Initialize libtool
AM_PROG_LIBTOOL

dnl Change the default prefix (/usr/local) to /usr
AC_PREFIX_DEFAULT('/usr')

dnl Package name
PACKAGE=libticalcs
AC_SUBST(PACKAGE)

dnl Config gile and init automake
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)

dnl Run test in a subshell; some versions of sh will print an error if
dnl an executable is not found, even if stderr is redirected.
dnl Redirect stdin to placate older versions of autoconf.  Sigh.
if (aclocal --print-ac-dir) </dev/null >/dev/null 2>&1 && test -w `aclocal --print-ac-dir`; then
    ACLOCALDIR=`aclocal --print-ac-dir`
    AC_SUBST(ACLOCALDIR)
fi
AM_CONDITIONAL(Aclocal, test x$ACLOCALDIR != x )

# Build time sanity check...
AM_SANITY_CHECK

dnl Checks for programs.
dnl AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_ISC_POSIX
AC_PROG_LIBTOOL
AC_PROG_GCC_TRADITIONAL

dnl Checks for libraries
AC_CHECK_LIB(curses, initscr)
AC_CHECK_LIB(ticables, ticable_get_version)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h string.h curses.h unistd.h time.h alloca.h errno.h fcntl.h libintl.h)
AC_CHECK_HEADERS(tilp/typedefs.h tilp/export.h tilp/macros.h tilp/cabl_def.h tilp/cabl_int.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_MODE_T

dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MALLOC
AC_CHECK_FUNCS(strstr strtol getwd memchr)

dnl Pass some flags
CFLAGS="$CFLAGS $ARCH -Wall -D_REENTRANT -D__LINUX__ -DVERBOSE"
AC_SUBST(CFLAGS)

ALL_LINGUAS="fr de it es nl"
AM_GNU_GETTEXT

dnl localedir=${datadir}/locale
dnl AC_SUBST(localedir)

AC_OUTPUT([Makefile docs/Makefile intl/Makefile macros/Makefile man/Makefile \
	po/Makefile.in src/Makefile tests/Makefile win32/Makefile \
	man/ticalcs-config.1 ticalcs-config \
        libticalcs.lsm libticalcs.spec])

echo Now, you can type 'make' and 'make install'