2 # Process this file with autoconf to produce a configure script.
4 # This file is part of libatasmart.
6 # Copyright 2008 Lennart Poettering
8 # libatasmart is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as
10 # published by the Free Software Foundation, either version 2.1 of the
11 # License, or (at your option) any later version.
13 # libatasmart is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with libatasmart. If not, If not, see
20 # <http://www.gnu.org/licenses/>.
24 AC_INIT([libatasmart],
26 [mzyvongnfzneg (at) 0pointer (dot) net],
28 [http://git.0pointer.de/?p=libatasmart.git])
30 AC_CONFIG_SRCDIR([atasmart.c])
31 AC_CONFIG_HEADERS([config.h])
32 AC_CONFIG_MACRO_DIR(m4)
33 AC_CONFIG_AUX_DIR([build-aux])
35 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz])
36 AM_SILENT_RULES([yes])
38 AC_SUBST(LIBATASMART_VERSION_INFO, [4:5:0])
40 if type -p stow > /dev/null && test -d /usr/local/stow ; then
41 AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
42 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
48 AC_PROG_GCC_TRADITIONAL
51 AC_USE_SYSTEM_EXTENSIONS
54 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
66 -Wmissing-include-dirs \
68 -Wold-style-definition \
71 -Wdeclaration-after-statement \
73 -Wmissing-prototypes \
76 -Wmissing-declarations \
84 -Wno-overlength-strings \
85 -Wno-unused-parameter \
86 -Wno-missing-field-initializers \
88 -Wunsafe-loop-optimizations \
91 -Wp,-D_FORTIFY_SOURCE=2 \
94 -fdiagnostics-show-option \
95 -fno-strict-aliasing \
98 AC_SUBST([WARNINGFLAGS], $with_cflags)
100 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
103 AC_SUBST([GCLDFLAGS], $with_ldflags)
106 PKG_CHECK_MODULES([LIBUDEV], [libudev >= 143])
109 LT_INIT([disable-static])
111 dnl###################################
113 dnl###################################
123 ---{ $PACKAGE_NAME $VERSION }---
126 sysconfdir: ${sysconfdir}
127 localstatedir: ${localstatedir}