File: configure.ac

package info (click to toggle)
zipios%2B%2B 0.1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 952 kB
  • sloc: cpp: 4,150; ansic: 148; makefile: 132; sh: 1
file content (84 lines) | stat: -rw-r--r-- 2,237 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
AC_PREREQ(2.59)

AC_INIT([zipios++], [0.1.7], [zipios-devel@lists.sourceforge.net], [zipios++])
AC_CONFIG_SRCDIR([src/appendzip.cpp])
AC_CONFIG_HEADER([zipios++/zipios-config.h])


# Use std compliant iostream library if present?
AC_ARG_WITH(
  [std-compliant-iostream],
  AS_HELP_STRING([--with-std-compliant-iostream], [Include <sstream> instead of <strstream> [[yes]]]),
  [
    if test -n "$withval" -a "$withval" != "no" -a "$withval" != "yes" ; then
      AC_MSG_ERROR([illegal argument specified for --with-std-compliant-iostream. Only 'yes' and 'no' are accepted.])
    fi
  ]
)
if test -z "$with_std_compliant_iostream" -o "$with_std_compliant_iostream" = "yes" ; then
  AC_DEFINE([USE_STD_IOSTREAM], [1], [Define if the std compliant iostream library should be used (if present)])
fi

AM_INIT_AUTOMAKE([gnu])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL

# Checks for libraries.
# Allow alternate location for zlib
AC_ARG_WITH(
  [zlib],
  [AS_HELP_STRING([--with-zlib=DIR], [specify location of zlib])],
  [
    AC_MSG_NOTICE([using `$withval' as alternative zlib location])
    AC_SUBST([ZLIB_CFLAGS], [-I$withval])
    AC_SUBST([ZLIB_LDFLAGS], [-L$withval])
  ]
)
AC_CHECK_LIB([z], [inflate], , AC_MSG_ERROR([zlib is required to compile $PACKAGE.]), [$ZLIB_LDFLAGS])
AC_CHECK_LIB([z], [zError], AC_DEFINE([HAVE_ZERROR], [1], [Define if zlib has zError]), , [$ZLIB_LDFLAGS])

# This doesn't work on newer version
# https://stackoverflow.com/questions/8533879/macro-am-path-cppunit-not-found-in-library
#AM_PATH_CPPUNIT(1.6.0)
PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.6.0)

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h])
AC_CXX_HAVE_STL
AC_CXX_HAVE_STD
AC_CXX_HAVE_STD_IOSTREAM

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_STRUCT_ST_BLOCKS
AC_STRUCT_TM
AC_CHECK_TYPES([ptrdiff_t])

# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_STAT
AC_CHECK_FUNCS([uname])


AC_CONFIG_FILES([
  Makefile
  src/Makefile
  tests/Makefile
  zipios++/Makefile
  zipios++.spec
])

AC_OUTPUT