summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-09-17 14:29:04 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-09-19 15:18:44 +0400
commitc76b25823acc92e232fa0a56389f9d144e51ce97 (patch)
tree6ec0c48220172aa0540795fff49ffac287454679 /configure.ac
parentde28f63015e215a128e3e64ae99db9f44099d23d (diff)
downloadlibpool-c76b25823acc92e232fa0a56389f9d144e51ce97.tar.gz
Portable version with autotoolsupstream/1.0upstream
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac65
1 files changed, 65 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..edce7b3
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,65 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([libpool], [1.0], [pashev.igor@gmail.com])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([usr/src/lib/libpool/common/pool_commit.c])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+
+# Checks for programs.
+AC_PROG_CC_C99
+LT_INIT
+
+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])
+
+
+AC_CHECK_HEADERS([sys/pool.h sys/pool_impl.h], [], [
+ AC_MSG_ERROR([Required system headers not found])
+ ])
+
+# Checks for header files.
+AC_CHECK_HEADERS([fcntl.h libintl.h limits.h stdlib.h string.h strings.h sys/time.h unistd.h])
+AC_CHECK_HEADERS([libnvpair.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_HEADER_STDBOOL
+AC_TYPE_INT64_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_UINT64_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([bzero ftruncate memset strdup strrchr strstr strtoull])
+
+
+# Checks for libraries.
+AM_PATH_XML2([2.7.0], [], [
+ AC_MSG_ERROR([libxml2 not found])
+ ])
+
+AC_CHECK_LIB([nvpair], [nvpair_value_string], [], [
+ AC_MSG_ERROR([libnvpair not found])
+ ])
+AC_CHECK_LIB([scf], [smf_enable_instance], [], [
+ AC_MSG_ERROR([libsmf not found])
+ ])
+AC_CHECK_LIB([exacct], [ea_unpack_object], [], [
+ AC_MSG_ERROR([libexacct not found])
+ ])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+