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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
dnl Written by Igor Pashev <pashev.igor@gmail.com>
dnl
dnl The author has placed this work in the Public Domain,
dnl thereby relinquishing all copyrights. Everyone is free
dnl to use, modify, republish, sell or give away this work
dnl The author has placed this work in the Public Domain,
dnl thereby relinquishing all copyrights. Everyone is free
dnl to use, modify, republish, sell or give away this work
dnl without prior consent from anybody.
AC_PREREQ([2.69])
AC_INIT([stmf], [1.0], [pashev.igor@gmail.com])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([usr/src/lib/libstmf/common/stmf.c])
AM_INIT_AUTOMAKE([foreign dist-xz])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.16.1])
AC_ARG_ENABLE([progs], AS_HELP_STRING([--disable-progs], [build only the libstmf library]))
AM_CONDITIONAL([ENABLE_PROGS], [test x$enable_progs != xno])
# Checks for programs.
AC_PROG_CC_C99
LT_INIT
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
AC_MSG_CHECKING([how to pass version script to the linker ($LD)])
VERSION_SCRIPT_FLAGS=none
if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
fi
AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
AC_SUBST(VERSION_SCRIPT_FLAGS)
AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none])
# Checks for header files.
AC_CHECK_HEADERS([sys/stmf_ioctl.h sys/stmf_sbd_ioctl.h sys/pppt_ioctl.h], [], [
AC_MSG_ERROR([Required system headers not found])
])
AC_CHECK_HEADERS([libnvpair.h libscf.h], [], [
AC_MSG_ERROR([Required library headers not found])
])
# Checks for libraries.
AC_CHECK_LIB([nvpair], [nvlist_alloc], [], [
AC_MSG_ERROR([libnvpair not found])
])
AC_CHECK_LIB([scf], [scf_transaction_property_change], [], [
AC_MSG_ERROR([libscf not found])
])
AC_SEARCH_LIBS([pow], [m])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
|