diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..17ecc08 --- /dev/null +++ b/configure.ac @@ -0,0 +1,48 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([libdevice], [1.0], [pashev.igor@gmail.com]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([usr/src/lib/libdevice/devctl.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/sunddi.h sys/devctl.h], [], [ + AC_MSG_ERROR([Required system headers not found]) + ]) +AC_CHECK_HEADERS([sys/ddi_impldefs.h], [], [ + AC_MSG_ERROR([Required system headers not found]) + ], [#include <sys/sunddi.h>]) + +# Checks for header files. +AC_CHECK_HEADERS([libnvpair.h sys/nvpair.h]) + +# Checks for libraries. +AC_CHECK_LIB([nvpair], [nvlist_alloc], [], [ + AC_MSG_ERROR([libnvpair not found]) + ]) + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT + |