Handle duplicated Total LBAs Written
[platform/upstream/libatasmart.git] / configure.ac
1 dnl -*- Autoconf -*-
2 dnl Process this file with autoconf to produce a configure script.
3
4 dnl This file is part of libatasmart.
5 dnl
6 dnl Copyright 2008 Lennart Poettering
7 dnl
8 dnl libatasmart is free software; you can redistribute it and/or modify
9 dnl it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation, either version 2.1 of the
11 dnl License, or (at your option) any later version.
12 dnl
13 dnl libatasmart is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public License for more details.
17 dnl
18 dnl You should have received a copy of the GNU Lesser General Public
19 dnl License along with libatasmart. If not, If not, see
20 dnl <http://www.gnu.org/licenses/>.
21
22 AC_PREREQ(2.63)
23
24 AC_INIT([libatasmart], 0.17, [mzyvongnfzneg (at) 0pointer (dot) net])
25 AC_CONFIG_SRCDIR([atasmart.c])
26 AC_CONFIG_HEADERS([config.h])
27 AC_CONFIG_MACRO_DIR(m4)
28
29 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
30
31 AC_SUBST(PACKAGE_URL, [http://git.0pointer.de/?p=libatasmart.git])
32
33 AC_SUBST(LIBATASMART_VERSION_INFO, [4:3:0])
34
35 AM_SILENT_RULES([yes])
36
37 if type -p stow > /dev/null && test -d /usr/local/stow ; then
38    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
39    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
40 fi
41
42 AC_PROG_CC
43 AC_PROG_CC_C99
44 AM_PROG_CC_C_O
45 AC_PROG_GCC_TRADITIONAL
46 AX_CC_FOR_BUILD
47
48 AC_USE_SYSTEM_EXTENSIONS
49 AC_SYS_LARGEFILE
50
51 AC_PROG_LIBTOOL
52
53 dnl Check compiler flags
54 CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math])
55
56 PKG_CHECK_MODULES([LIBUDEV], [libudev >= 143])
57
58 dnl###################################
59 dnl#            Output               #
60 dnl###################################
61
62 AC_CONFIG_FILES([
63 Makefile
64 strpool/Makefile
65 libatasmart.pc
66 ])
67 AC_OUTPUT
68
69 echo "
70  ---{ $PACKAGE_NAME $VERSION }---
71
72     prefix:                 ${prefix}
73     sysconfdir:             ${sysconfdir}
74     localstatedir:          ${localstatedir}
75     Compiler:               ${CC}
76     CFLAGS:                 ${CFLAGS}
77 "