File: configure.ac

package info (click to toggle)
libkdumpfile 0.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,156 kB
  • sloc: ansic: 36,541; sh: 4,219; python: 1,569; makefile: 812
file content (130 lines) | stat: -rw-r--r-- 3,902 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
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (C) 2014-2020 Petr Tesarik <ptesarik@suse.com>
dnl
dnl This file is part of libkdumpfile.
dnl
dnl  This file is free software; you can redistribute it and/or modify
dnl  it under the terms of the GNU General Public License as published by
dnl  the Free Software Foundation; either version 3 of the License, or
dnl  (at your option) any later version.
dnl
dnl  libkdumpfile is distributed in the hope that it will be useful, but
dnl  WITHOUT ANY WARRANTY; without even the implied warranty of
dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl  GNU General Public License for more details.
dnl
dnl  You should have received a copy of the GNU General Public License
dnl  along with this program.  If not, see <http://www.gnu.org/licenses/>.

dnl Package release versioning
m4_define([pkg_major_version], [0])
m4_define([pkg_minor_version], [5])
m4_define([pkg_micro_version], [5])
m4_define([pkg_version],
          [pkg_major_version.pkg_minor_version.pkg_micro_version])

dnl FIXME: kdumpid has a different versioning scheme
m4_define([kdumpid_major_version], [1])
m4_define([kdumpid_minor_version], [7])

AC_INIT([libkdumpfile],[pkg_version],[petr@tesarici.cz])

AC_CONFIG_SRCDIR([src/kdumpfile/diskdump.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])

AM_INIT_AUTOMAKE([foreign dist-bzip2 -Wall])

PACKAGE_VER_MAJOR=pkg_major_version
PACKAGE_VER_MINOR=pkg_minor_version
PACKAGE_VER_MICRO=pkg_micro_version

AC_SUBST(PACKAGE_VER_MAJOR)
AC_SUBST(PACKAGE_VER_MINOR)
AC_SUBST(PACKAGE_VER_MICRO)

AC_PROG_CC
AM_PROG_AR

LT_INIT

check_ldvers

DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile],[doc])

AC_ARG_ENABLE(internal-doc,
  [AS_HELP_STRING([--enable-internal-doc],
    [Generate documentation for internal APIs @<:@default=no@:>@])],
  [], [enable_internal_doc=no])
AS_IF([test "x$enable_internal_doc" != xno],
    [DX_ENV_APPEND(ENABLE_INTERNAL, YES)],
    [DX_ENV_APPEND(ENABLE_INTERNAL, NO)])

AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(off_t)
AC_SUBST(SIZEOF_OFF_T, $ac_cv_sizeof_off_t)

AC_CHECK_FUNCS(mmap64)

dnl This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])

kdump_COMPRESSION(zlib, ZLIB, z, uncompress)
kdump_COMPRESSION(lzo2, LZO, lzo2, lzo1x_decompress_safe)
kdump_COMPRESSION(snappy, SNAPPY, snappy, snappy_uncompress)
kdump_COMPRESSION(libzstd, ZSTD, zstd, ZSTD_decompress)

dnl check for pthread support
AC_ARG_WITH(pthread,
  [AS_HELP_STRING([--without-pthread],
    [pthread support @<:@default=check@:>@])],
  [],[with_pthread=check])
AS_IF([test "x$with_pthread" != xno],
  [AC_SEARCH_LIBS(pthread_create, pthread,
    [PTHREAD_LIBS="-lpthread"
     AS_VAR_APPEND(LIBS_PRIVATE, " -lpthread")
     have_pthread=yes
    ],[
     have_pthread=no
    ])
  ],[have_pthread=no])
AS_IF([test "x$have_pthread" = xyes],
  [AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)],
  [AS_IF([test "x$with_phtread" = xyes],
    [AC_MSG_ERROR([pthread support requested but not found])
    ])
  ])
AC_SUBST(PTHREAD_LIBS)

dnl check for useful debugging options
AC_ARG_ENABLE(debug,
  [AS_HELP_STRING([--enable-debug],
    [Make a build suitable for debugging @<:@default=no@:>@])],
  [], [enable_debug=no])
AS_IF([test "x$enable_debug" = xyes],
    [AC_DEFINE(ENABLE_DEBUG, 1, Define to enable extra debugging features)])

dnl check whether to build optional tools
AC_SUBST(KDUMPID_VER_MAJOR, kdumpid_major_version)
AC_SUBST(KDUMPID_VER_MINOR, kdumpid_minor_version)
KDUMP_TOOL_KDUMPID

AC_CONFIG_FILES([
	Makefile
	examples/Makefile
	include/Makefile
	include/libkdumpfile/Makefile
	src/Makefile
	src/addrxlat/Makefile
	src/kdumpfile/Makefile
	tests/Makefile
	tools/Makefile
	tools/kdumpid/Makefile
	libaddrxlat.pc
	libkdumpfile.pc
	include/libkdumpfile/kdumpfile.h
	include/libkdumpfile/addrxlat.h
])

AC_OUTPUT