-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
82 lines (66 loc) · 2.06 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
#base
AC_INIT([libvpd],[2.2.5],[hegdevasant@in.ibm.com,kamaleshb@in.ibm.com])
AC_CONFIG_HEADER([config/config.h])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall subdir-objects -Werror foreign])
AC_SUBST(DATE, [`date`])
AM_PROG_AR
#Generic variable setup
GENERIC_LIBRARY_NAME=libvpd
#Release version
GENERIC_MAJOR_VERSION=2
GENERIC_MINOR_VERSION=2
GENERIC_MICRO_VERSION=5
GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION
AC_SUBST(GENERIC_API_VERSION)
GENERIC_CXX_LIBRARY_VERSION=$GENERIC_MAJOR_VERSION:$GENERIC_MINOR_VERSION:$GENERIC_MICRO_VERSION
GENERIC_C_LIBRARY_VERSION=$GENERIC_MAJOR_VERSION:$GENERIC_MINOR_VERSION:$GENERIC_MICRO_VERSION
AC_SUBST(GENERIC_CXX_LIBRARY_VERSION)
AC_SUBST(GENERIC_C_LIBRARY_VERSION)
AC_SUBST(GENERIC_LIBRARY_VERSION)
PACKAGE=$GENERIC_LIBRARY_NAME
AC_SUBST(GENERIC_LIBRARY_NAME)
GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
AC_SUBST(GENERIC_RELEASE)
AC_SUBST(GENERIC_VERSION)
VERSION=$GENERIC_VERSION
#programs
AC_LANG([C++])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_C_CONST
AC_C_INLINE
AC_HEADER_STDBOOL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
#headers
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/param.h syslog.h unistd.h ctype.h arpa/inet.h netinet/in.h])
AC_CHECK_HEADERS([sqlite3.h],,[AC_MSG_ERROR([sqlite header files are required for building libvpd])])
#libraries
AC_CHECK_LIB(sqlite3, sqlite3_libversion_number, [], [
echo "sqlite3 library is required for lsvpd"
exit 1 ])
AC_FUNC_CLOSEDIR_VOID
AC_PROG_GCC_TRADITIONAL
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_HEADER_MAJOR
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([memmove memset mkdir socket strdup strerror strtol uname sqlite3_prepare_v2])
#finished
AC_CONFIG_FILES([Makefile libvpd.spec libvpd-2.pc libvpd_cxx-2.pc])
AC_OUTPUT