2 # $Id: configure.ac 4181 2015-12-07 20:58:40Z chrfranke $
4 dnl Process this file with autoconf to produce a configure script.
6 AC_INIT(smartmontools, 6.5, smartmontools-support@lists.sourceforge.net)
7 AM_INIT_AUTOMAKE([1.10 foreign])
9 smartmontools_cvs_tag=`echo '$Id: configure.ac 4181 2015-12-07 20:58:40Z chrfranke $'`
10 smartmontools_release_date=2015-06-04
11 smartmontools_release_time="16:29:41 UTC"
13 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_ARGS, "$ac_configure_args", [smartmontools Configure Arguments])
14 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_DATE, "$smartmontools_release_date", [smartmontools Release Date])
15 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_TIME, "$smartmontools_release_time", [smartmontools Release Time])
16 AC_DEFINE_UNQUOTED(CONFIG_H_CVSID, "$smartmontools_cvs_tag", [smartmontools CVS Tag])
17 AC_DEFINE_UNQUOTED(PACKAGE_HOMEPAGE, "http://www.smartmontools.org/", [smartmontools Home Page])
19 AC_CONFIG_SRCDIR([smartctl.cpp])
20 AC_CONFIG_HEADER([config.h])
25 dnl Checks for programs.
30 m4_pattern_forbid([^PKG_PROG_])
31 if test "$cross_compiling" = "no"; then
32 m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG],
33 [AC_MSG_WARN([m4/pkg.m4 missing, systemd detection disabled])])
36 AC_ARG_VAR(WINDMC, [Windows message compiler command])
37 AC_ARG_VAR(WINDRES, [Windows resource compiler command])
38 AC_ARG_VAR(MAKENSIS, [NSIS compiler command])
43 AC_CHECK_TOOL(WINDMC, [windmc])
44 AC_CHECK_TOOL(WINDRES, [windres])
46 AC_MSG_CHECKING([for makensis])
47 if test -z "$MAKENSIS"; then
48 if test -n "$PROGRAMFILES" && "$PROGRAMFILES/NSIS/makensis" -VERSION >/dev/null 2>&1; then
49 MAKENSIS="$PROGRAMFILES/NSIS/makensis"
50 elif makensis -VERSION >/dev/null 2>&1; then
54 AC_MSG_RESULT([${MAKENSIS:-no}])
59 AC_MSG_CHECKING([whether this is a build from SVN])
62 if test -f "$srcdir/.svn/wc.db"; then
63 # SVN 1.7, 1.8 working copy
64 svn_deps='${srcdir}/.svn/wc.db'
65 elif test -f "${srcdir}/.svn/entries"; then
66 # SVN <= 1.6 working copy (SVN 1.7 has empty entries file)
67 svn_deps='${srcdir}/.svn/entries'
69 if test -n "$svn_deps"; then
71 if (cd "$srcdir" && svn --version && svnversion && svn info) >/dev/null 2>&1; then
76 AM_CONDITIONAL(IS_SVN_BUILD, [test "$is_svn_build" = "yes"])
77 AC_MSG_RESULT([$is_svn_build])
79 # Note: On Linux, clock_gettime() requires -lrt which implies -lpthreads
80 # Check ommitted for now, gettimeofday() provides reasonable precision
81 # AC_SEARCH_LIBS(clock_gettime, rt)
83 dnl Checks for header files.
84 AC_CHECK_HEADERS([locale.h])
85 AC_CHECK_HEADERS([dev/ata/atavar.h])
86 AC_CHECK_HEADERS([netdb.h])
87 dnl we need [u]int64_t and friends.
88 AC_CHECK_HEADERS([inttypes.h]) dnl C99, UNIX98, solaris 2.6+
89 AC_CHECK_HEADERS([stdint.h]) dnl C99
90 AC_CHECK_HEADERS([sys/inttypes.h]) dnl pre-UNIX98
91 AC_CHECK_HEADERS([sys/int_types.h]) dnl pre-UNIX98, solaris 2.6+
92 dnl Check for FreeBSD twe include files...currently missing on 5.2, but should be there
93 AC_CHECK_HEADERS([sys/tweio.h])
94 AC_CHECK_HEADERS([sys/twereg.h])
95 dnl Check for FreeBSD twa include files...
96 AC_CHECK_HEADERS([sys/tw_osl_ioctl.h])
97 dnl This header file is needed for cciss_ioctl.h at least on SuSE LINUX
98 AC_CHECK_HEADERS([linux/compiler.h])
99 dnl Check for the FreeBSD CCISS system header and use internal one if not found
100 AC_CHECK_HEADERS([dev/ciss/cissio.h],
101 [AC_DEFINE([CISS_LOCATION],[<dev/ciss/cissio.h>],[freebsd ciss header location])],
102 [AC_DEFINE([CISS_LOCATION],["cissio_freebsd.h"],[freebsd ciss header location])]
104 dnl Check for Linux CCISS include file
105 AC_CHECK_HEADERS([linux/cciss_ioctl.h], [], [], [AC_INCLUDES_DEFAULT
106 #ifdef HAVE_LINUX_COMPILER_H
107 # include <linux/compiler.h>
110 dnl Check for Windows DDK and WMI header files
111 AC_CHECK_HEADERS([ntdddisk.h ddk/ntdddisk.h], [], [], [AC_INCLUDES_DEFAULT
114 AC_CHECK_HEADERS([wbemcli.h])
116 dnl Checks for typedefs, structures, and compiler characteristics.
117 AC_CHECK_TYPES([int64_t, uint64_t])
119 dnl Checks for library functions.
120 AC_CHECK_FUNCS([getopt_long], [need_getopt_long=no], [need_getopt_long=yes])
121 AM_CONDITIONAL(NEED_GETOPT_LONG, [test "$need_getopt_long" = "yes"])
122 AC_CHECK_FUNCS([regcomp], [need_regex=no], [need_regex=yes])
123 AM_CONDITIONAL(NEED_REGEX, [test "$need_regex" = "yes"])
125 AC_CHECK_FUNCS([sigset])
126 AC_CHECK_FUNCS([strtoull])
127 AC_CHECK_FUNCS([uname])
128 AC_CHECK_FUNCS([clock_gettime ftime gettimeofday])
130 # Check byte ordering (defines WORDS_BIGENDIAN)
133 # check for __attribute__((packed))
134 # (sizeof() check is required to avoid false positives if other
135 # __attribute__((x)) are supported)
136 AC_MSG_CHECKING([whether $CXX supports __attribute__((packed))])
137 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[
138 struct s { char a; short b; } __attribute__((packed));
139 typedef char t[sizeof(struct s) == 3 ? 1 : -1];]])],
140 [gcc_have_attr_packed=yes], [gcc_have_attr_packed=no])
141 AC_SUBST(gcc_have_attr_packed)
142 if test "$gcc_have_attr_packed" = "yes"; then
143 AC_DEFINE(HAVE_ATTR_PACKED, 1, [Define to 1 if C++ compiler supports __attribute__((packed))])
145 AC_MSG_RESULT([$gcc_have_attr_packed])
151 AC_ARG_WITH(systemdsystemunitdir,
152 [AS_HELP_STRING([--with-systemdsystemunitdir@<:@=DIR|auto|yes|no@:>@], [Location of systemd service files [auto]])],
153 [], [with_systemdsystemunitdir=auto])
155 systemdsystemunitdir=
156 case "$with_systemdsystemunitdir" in
158 if test -n "$PKG_CONFIG"; then
159 AC_MSG_CHECKING([for systemdsystemunitdir])
160 systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd 2>/dev/null`
161 AC_MSG_RESULT([${systemdsystemunitdir:-no}])
163 case "$with_systemdsystemunitdir:$sysconfdir:$systemdsystemunitdir" in
164 yes:*:) AC_MSG_ERROR([Location of systemd service files not found]) ;;
165 yes:*:*|auto:*:|auto:/etc:*) ;;
166 *) systemdsystemunitdir='${prefix}'$systemdsystemunitdir ;;
169 *) systemdsystemunitdir="$with_systemdsystemunitdir" ;;
171 AC_SUBST(systemdsystemunitdir)
172 AM_CONDITIONAL(INSTALL_SYSTEMDUNIT, [test -n "$systemdsystemunitdir"])
174 AC_ARG_WITH(systemdenvfile,
175 [AS_HELP_STRING([--with-systemdenvfile@<:@=FILE|auto|yes|no@:>@], [Path of systemd EnvironmentFile [auto]])],
176 [], [with_systemdenvfile=auto])
179 case "$with_systemdenvfile:$cross_compiling:$systemdsystemunitdir" in
181 AC_MSG_CHECKING([for path of systemd EnvironmentFile])
182 for dir in sysconfig default; do
183 if test -d /etc/$dir; then
184 systemdenvfile='${sysconfdir}'/$dir/smartmontools
188 AC_MSG_RESULT([${systemdenvfile:-no}])
189 case "$with_systemdenvfile:$systemdenvfile" in
190 yes:) AC_MSG_ERROR([Path of systemd EnvironmentFile not found]) ;;
193 *:*:) AC_MSG_ERROR([Location of systemd service files not found]) ;;
194 *) systemdenvfile="$with_systemdenvfile"
196 AC_SUBST(systemdenvfile)
198 AC_ARG_WITH(initscriptdir,
199 [AS_HELP_STRING([--with-initscriptdir@<:@=DIR|auto|yes|no@:>@], [Location of init scripts [auto]])],
200 [], [with_initscriptdir=auto])
203 case "$with_initscriptdir:$cross_compiling:$systemdsystemunitdir" in
205 AC_MSG_CHECKING([for init (rc) directory])
206 for dir in rc.d/init.d init.d rc.d; do
207 if test -d /etc/$dir; then
208 initddir='${sysconfdir}'/$dir
212 AC_MSG_RESULT([${initddir:-no}])
213 case "$with_initscriptdir:$initddir" in
214 yes:) AC_MSG_ERROR([Location of init scripts not found]) ;;
217 *) initddir="$with_initscriptdir" ;;
220 AM_CONDITIONAL(INSTALL_INITSCRIPT, [test -n "$initddir"])
222 # use different init script templates for different OS
225 initdfile="smartd.freebsd.initd"
228 initdfile="smartd.initd"
233 AC_ARG_WITH(exampledir,
234 [AS_HELP_STRING([--with-exampledir=DIR], [Location of example scripts [DOCDIR/examplescripts]])],
235 [exampledir="$withval"], [exampledir='${docdir}/examplescripts'])
238 drivedbdir='${datadir}/${PACKAGE}'
239 AC_ARG_WITH(drivedbdir,
240 [AS_HELP_STRING([--with-drivedbdir@<:@=DIR|yes|no@:>@], [Location of drive database file [DATADIR/smartmontools]])],
241 [case "$withval" in yes) ;; no) drivedbdir= ;; *) drivedbdir="$withval" ;; esac])
243 AM_CONDITIONAL(ENABLE_DRIVEDB, [test -n "$drivedbdir"])
245 AC_ARG_WITH(smartdscriptdir,
246 [AS_HELP_STRING([--with-smartdscriptdir=DIR], [Location of smartd_warning.sh script [SYSCONFDIR]])],
247 [smartdscriptdir="$withval"], [smartdscriptdir='${sysconfdir}'])
248 AC_SUBST(smartdscriptdir)
250 AC_ARG_WITH(smartdplugindir,
251 [AS_HELP_STRING([--with-smartdplugindir=@<:@DIR|no@:>@],
252 [Location of smartd_warning.sh plugin scripts [SMARTDSCRIPTDIR/smartd_warning.d]])],
253 [smartdplugindir=; test "$withval" != "no" && smartdplugindir="$withval"],
254 [smartdplugindir='${smartdscriptdir}/smartd_warning.d'])
255 AC_SUBST(smartdplugindir)
258 AC_ARG_WITH(savestates,
259 [AS_HELP_STRING([--with-savestates@<:@=PREFIX|yes|no@:>@],
260 [Enable default smartd state files [no] (yes=LOCALSTATEDIR/lib/smartmontools/smartd.)])],
261 [case "$withval" in yes) savestates='${localstatedir}/lib/${PACKAGE}/smartd.' ;;
262 no) ;; *) savestates="$withval" ;; esac])
263 savestatesdir="${savestates%/*}"
265 AC_SUBST(savestatesdir)
266 AM_CONDITIONAL(ENABLE_SAVESTATES, [test -n "$savestates"])
269 AC_ARG_WITH(attributelog,
270 [AS_HELP_STRING([--with-attributelog@<:@=PREFIX|yes|no@:>@],
271 [Enable default smartd attribute log files [no] (yes=LOCALSTATEDIR/lib/smartmontools/attrlog.)])],
272 [case "$withval" in yes) attributelog='${localstatedir}/lib/${PACKAGE}/attrlog.' ;;
273 no) ;; *) attributelog="$withval" ;; esac])
274 attributelogdir="${attributelog%/*}"
275 AC_SUBST(attributelog)
276 AC_SUBST(attributelogdir)
277 AM_CONDITIONAL(ENABLE_ATTRIBUTELOG, [test -n "$attributelog"])
279 AC_ARG_ENABLE(sample,
280 [AS_HELP_STRING([--enable-sample], [Enables appending .sample to the installed smartd rc script and configuration file])],
281 [smartd_suffix=; test "$enableval" = "yes" && smartd_suffix=".sample"],
283 AC_SUBST(smartd_suffix)
286 [AS_HELP_STRING([--with-os-deps='os_module.o ...'], [Specify OS dependent module(s) [guessed]])],
287 [ for x in $with_os_deps; do
290 *) AC_MSG_ERROR([non-object file specified by --with-os-deps]) ;;
296 [AS_HELP_STRING([--with-selinux@<:@=yes|no@:>@], [Enables SELinux support [no]])],
297 [ if test "$withval" = "yes"; then
298 AC_CHECK_HEADERS([selinux/selinux.h], [], [AC_MSG_ERROR([Missing SELinux header files])])
299 AC_CHECK_LIB(selinux, matchpathcon, [], [AC_MSG_ERROR([Missing or incorrect SELinux library files])])
302 AC_SUBST(with_selinux)
303 if test "$with_selinux" = "yes"; then
304 AC_DEFINE(WITH_SELINUX, 1, [Define to 1 if SELinux support is enabled])
307 AC_ARG_WITH(libcap-ng,
308 [AS_HELP_STRING([--with-libcap-ng@<:@=auto|yes|no@:>@], [Add Libcap-ng support to smartd [auto]])],
309 [], [with_libcap_ng=auto])
312 if test "$with_libcap_ng" != "no"; then
313 AC_CHECK_LIB(cap-ng, capng_clear,
314 [AC_DEFINE(HAVE_LIBCAP_NG, 1, [Define to 1 if you have the `cap-ng' library (-lcap-ng).]) dnl `vim syntax
315 CAPNG_LDADD="-lcap-ng"; use_libcap_ng=yes])
317 if test "$use_libcap_ng" = "yes"; then
318 AC_CHECK_HEADER(cap-ng.h, [], [AC_MSG_ERROR([libcap-ng libraries found but headers are missing])])
319 elif test "$with_libcap_ng" = "yes"; then
320 AC_MSG_ERROR([libcap-ng support was requested but the library was not found])
324 AC_MSG_CHECKING([whether to use libcap-ng])
325 AC_SUBST(CAPNG_LDADD)
326 AC_MSG_RESULT([$use_libcap_ng])
328 AC_ARG_WITH(solaris-sparc-ata,
329 [AS_HELP_STRING([--with-solaris-sparc-ata@<:@=yes|no@:>@],
330 [Enable legacy ATA support on Solaris SPARC (requires os_solaris_ata.s from SVN repository) [no]])])
332 case "$host:$with_solaris_sparc_ata" in
333 sparc-*-solaris*:yes)
334 if test ! -f "$srcdir/os_solaris_ata.s"; then
335 AC_MSG_ERROR([Missing source file: $srcdir/os_solaris_ata.s
336 This file is no longer included in the source tarball but still
337 available in the SVN repository.])
339 AC_DEFINE(WITH_SOLARIS_SPARC_ATA, 1, [Define to 1 to enable legacy ATA support on Solaris SPARC.])
343 # Assume broken snprintf only on Windows with MSVCRT (MinGW without ANSI stdio support)
344 libc_have_working_snprintf=yes
348 case " $CPPFLAGS $CXXFLAGS" in
349 *\ -[[DU]]__USE_MINGW_ANSI_STDIO*)
352 # Older MinGW do not properly define PRI?64 if __USE_MINGW_ANSI_STDIO is set
353 # Newer MinGW set __USE_MINGW_ANSI_STDIO in first C++ include which may be too late
354 AC_MSG_CHECKING([whether __USE_MINGW_ANSI_STDIO is defined by C++ includes])
355 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
356 #undef __USE_MINGW_ANSI_STDIO
358 #ifndef __USE_MINGW_ANSI_STDIO
361 [CXXFLAGS="-D__USE_MINGW_ANSI_STDIO $CXXFLAGS"],
362 [libc_have_working_snprintf=no])
363 AC_MSG_RESULT([$libc_have_working_snprintf])
368 AC_ARG_WITH(working-snprintf,
369 [AS_HELP_STRING([--with-working-snprintf@<:@=yes|no@:>@],
370 [Function snprintf() handles output truncation as specified by C99 [MinGW:guessed,others:yes]])],
371 [libc_have_working_snprintf=$withval])
373 if test "$libc_have_working_snprintf" = "yes"; then
374 AC_DEFINE(HAVE_WORKING_SNPRINTF, 1, [Define to 1 if the `snprintf' function is sane.]) dnl `vim syntax
380 # Newer MinGW may add a default manifest
381 AC_MSG_CHECKING([whether $CC adds an application manifest])
383 AC_LINK_IFELSE([AC_LANG_PROGRAM()], [
384 if "$WINDRES" -O rc conftest.exe 2>/dev/null | grep '^1.*RT_MANIFEST' >/dev/null 2>&1; then
385 cc_adds_manifest=incomplete
386 # Manifest must provide a Win 10 compatibility ID
387 if "$WINDRES" -O rc conftest.exe 2>/dev/null | grep '{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}' >/dev/null 2>&1; then
391 [AC_MSG_ERROR([test compile failed])])
392 AC_MSG_RESULT([$cc_adds_manifest])
393 test "$cc_adds_manifest" = "yes" || os_win32_manifest='default.manifest.o'
397 # TODO: Remove after smartmontools 6.5
399 [AS_HELP_STRING([--with-docdir=DIR], [(removed, use --docdir=DIR instead)])],
400 [AC_MSG_ERROR([--with-docdir is no longer supported, use --docdir instead])])
401 AC_ARG_ENABLE(drivedb,
402 [AS_HELP_STRING([--disable-drivedb], [(removed, use --without-drivedbdir instead)])])
403 AC_ARG_ENABLE(savestates,
404 [AS_HELP_STRING([--enable-savestates], [(removed, use --with-savestates@<:@=yes@:>@ instead)])])
405 AC_ARG_ENABLE(attributelog,
406 [AS_HELP_STRING([--enable-attributelog], [(removed, use --with-attributelog@<:@=yes@:>@ instead)])])
407 if test -n "${enable_drivedb+set}${enable_savestates+set}${enable_attributelog+set}"; then
408 AC_MSG_ERROR([Options --disable-drivedb, --enable-savestates, --enable-attributelog are no longer supported.
409 Use --without-drivedbdir, --with-savestates, --with-attributelog instead.])
413 AC_SUBST(releaseversion,['${PACKAGE}-${VERSION}'])
414 AC_SUBST(smartmontools_release_date)
415 AC_SUBST(smartmontools_release_time)
417 # Set platform-specific modules and symbols
419 os_dltools='curl wget lynx svn'
421 os_hostname="'hostname'"
423 os_nisdomainname="'domainname'"
432 os_deps='os_linux.o cciss.o dev_areca.o'
433 os_dnsdomainname="'dnsdomainname' 'hostname -d'"
434 os_nisdomainname="'nisdomainname' 'hostname -y' 'domainname'"
437 *-*-freebsd*|*-*-dragonfly*|*-*-kfreebsd*-gnu*)
438 os_deps='os_freebsd.o cciss.o dev_areca.o'
440 os_dltools='curl wget lynx fetch svn'
441 AC_CHECK_LIB(usb, libusb20_dev_get_device_desc)
442 os_man_filter=FreeBSD
445 os_deps='os_solaris.o'
446 test "$with_solaris_sparc_ata" = "yes" \
447 && os_deps="$os_deps os_solaris_ata.o"
450 os_man_filter=Solaris
453 os_deps='os_solaris.o'
456 os_man_filter=Solaris
459 os_deps='os_netbsd.o'
464 os_deps='os_openbsd.o'
466 os_dltools='curl wget lynx ftp svn'
467 os_man_filter=OpenBSD
470 os_deps='os_win32.o dev_areca.o'
472 os_hostname="'hostname' 'echo "'"${HOSTNAME?unset}"'"'"
473 os_dnsdomainname="'dnsdomainname' 'hostname -d' 'echo "'"${USERDNSDOMAIN?unset}"'"'"
479 os_deps='os_win32.o dev_areca.o'
483 os_man_filter=Windows
486 os_deps='os_win32.o dev_areca.o'
489 os_man_filter=Windows
492 os_deps='os_darwin.o'
493 os_libs='-framework CoreFoundation -framework IOKit'
498 os_deps='os_qnxnto.o'
501 os_deps='os_generic.o'
505 # Replace if '--with-os-deps' was specified
506 test -z "$with_os_deps" || os_deps="$with_os_deps"
508 # Check if we need adapter to old interface (dev_legacy.cpp)
509 os_src=`echo "${os_deps}"|sed -n 's,^\([[^ .]]*\)\.o.*$,\1.cpp,p'`
510 AC_MSG_CHECKING([whether ${os_src} uses new interface])
511 if grep "smart_interface" "${srcdir}/${os_src}" >/dev/null 2>&1; then
515 os_deps="${os_deps} dev_legacy.o"
516 AC_DEFINE(OLD_INTERFACE, 1, [Define to 1 if os_*.cpp still uses the old interface])
518 AC_MSG_RESULT([$os_new_interface])
522 AC_SUBST([os_dltools])
523 AC_SUBST([os_mailer])
524 AC_SUBST([os_hostname])
525 AC_SUBST([os_dnsdomainname])
526 AC_SUBST([os_nisdomainname])
527 AC_SUBST([os_man_filter])
528 AC_SUBST([os_win32_manifest])
530 # Create drivedb.h update branch name from version: 5.41[.X] -> RELEASE_5_41_DRIVEDB
531 DRIVEDB_BRANCH=`echo $VERSION | sed 's,^\([[0-9]]*\.[[0-9]]*\)\..*$,\1,' \
532 | sed -n 's,^\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)$,RELEASE_\1_\2_DRIVEDB,p'`
533 if test -z "$DRIVEDB_BRANCH"; then
534 AC_MSG_ERROR([Unable to create DRIVEDB_BRANCH from VERSION=$VERSION])
536 AC_SUBST([DRIVEDB_BRANCH])
538 # Enable platform-specific makefile sections
539 AM_CONDITIONAL(OS_DARWIN, [test "$os_darwin" = "yes"])
540 AM_CONDITIONAL(OS_SOLARIS, [test "$os_solaris" = "yes"])
541 AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"])
542 AM_CONDITIONAL(OS_WIN32_MINGW, [test "$os_win32_mingw" = "yes"])
543 AM_CONDITIONAL(OS_WIN32_NSIS, [test -n "$MAKENSIS"])
544 AM_CONDITIONAL(OS_WIN64, [test "$os_win64" = "yes"])
546 dnl Add -Wall and -W if using g++ and its not already specified.
547 if test "$GXX" = "yes"; then
548 if test -z "`echo "$CXXFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
549 CXXFLAGS="$CXXFLAGS -Wall"
551 # In the next line, do NOT delete the 2 spaces inside double quotes.
552 if test -z "`echo "$CXXFLAGS " | grep "\-W " 2> /dev/null`" ; then
553 CXXFLAGS="$CXXFLAGS -W"
557 dnl We are NOT using gcc, so enable host-specific compiler flags
560 dnl set CXXFLAGS for Solaris/SPARC C++ compiler
561 if test -z "`echo "$CXXFLAGS" | grep "\-xmemalign" 2> /dev/null`" ; then
562 dnl we have to tell the compilers about packed ATA structures
563 CXXFLAGS="-xmemalign=1i $CXXFLAGS"
568 if test -z "`echo "$CXXFLAGS" | grep "\-xO" 2> /dev/null`" ; then
569 dnl turn on optimization if user has not explicitly set its value
570 CXXFLAGS="-xO2 $CXXFLAGS"
572 if test -z "`echo "$CXXFLAGS" | grep "\-erroff" 2> /dev/null`" ; then
573 dnl suppress trivial warnings
574 CXXFLAGS="-erroff=%none,wbadinitl,wbadasgl,badargtypel2w,badargtype2w $CXXFLAGS"
579 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_BUILD_HOST, "${host}", [smartmontools Build Host])
583 AC_CONFIG_FILES(Makefile)
587 echo "-----------------------------------------------------------------------------" >&AS_MESSAGE_FD
588 echo "${PACKAGE}-${VERSION} configuration:" >&AS_MESSAGE_FD
589 echo "host operating system: $host" >&AS_MESSAGE_FD
590 echo "C++ compiler: $CXX" >&AS_MESSAGE_FD
591 echo "C compiler: $CC" >&AS_MESSAGE_FD
592 echo "preprocessor flags: $CPPFLAGS" >&AS_MESSAGE_FD
593 echo "C++ compiler flags: $CXXFLAGS" >&AS_MESSAGE_FD
594 echo "C compiler flags: $CFLAGS" >&AS_MESSAGE_FD
595 echo "linker flags: $LDFLAGS" >&AS_MESSAGE_FD
596 echo "OS specific modules: $os_deps $os_libs $LIBS" >&AS_MESSAGE_FD
600 echo "application manifest: ${os_win32_manifest:-built-in}" >&AS_MESSAGE_FD
601 echo "resource compiler: $WINDRES" >&AS_MESSAGE_FD
602 echo "message compiler: $WINDMC" >&AS_MESSAGE_FD
603 echo "NSIS compiler: $MAKENSIS" >&AS_MESSAGE_FD
604 if test -n "$drivedbdir"; then
605 echo "drive database file: EXEDIR/drivedb.h" >&AS_MESSAGE_FD
606 if test -n "$MAKENSIS"; then
607 echo "database update tool: EXEDIR/update-smart-drivedb.exe" >&AS_MESSAGE_FD
610 echo "drive database file: [[disabled]]" >&AS_MESSAGE_FD
612 if test -n "$savestates"; then
613 echo "smartd save files: `eval eval eval echo $savestates`MODEL-SERIAL.TYPE.state" >&AS_MESSAGE_FD
615 if test -n "$attributelog"; then
616 echo "smartd attribute logs: `eval eval eval echo $attributelog`MODEL-SERIAL.TYPE.csv" >&AS_MESSAGE_FD
621 echo "binary install path: `eval eval eval echo $sbindir`" >&AS_MESSAGE_FD
622 echo "man page install path: `eval eval eval echo $mandir`" >&AS_MESSAGE_FD
623 echo "doc file install path: `eval eval eval echo $docdir`" >&AS_MESSAGE_FD
624 echo "examples install path: `eval eval eval echo $exampledir`" >&AS_MESSAGE_FD
625 if test -n "$drivedbdir"; then
626 echo "drive database file: `eval eval eval echo $drivedbdir`/drivedb.h" >&AS_MESSAGE_FD
627 echo "database update script: `eval eval eval echo $sbindir`/update-smart-drivedb" >&AS_MESSAGE_FD
628 echo "download tools: `eval eval eval echo $os_dltools`" >&AS_MESSAGE_FD
630 echo "drive database file: [[disabled]]" >&AS_MESSAGE_FD
632 echo "local drive database: `eval eval eval echo $sysconfdir`/smart_drivedb.h" >&AS_MESSAGE_FD
633 echo "smartd config file: `eval eval eval echo $sysconfdir`/smartd.conf${smartd_suffix}" >&AS_MESSAGE_FD
634 echo "smartd warning script: `eval eval eval echo $smartdscriptdir`/smartd_warning.sh" >&AS_MESSAGE_FD
635 if test -n "$smartdplugindir"; then
636 echo "smartd plugin path: `eval eval eval echo $smartdplugindir`" >&AS_MESSAGE_FD
638 echo "smartd plugin path: [[disabled]]" >&AS_MESSAGE_FD
640 if test -n "$initddir"; then
641 echo "smartd initd script: `eval eval eval echo $initddir`/smartd${smartd_suffix}" >&AS_MESSAGE_FD
642 elif test -z "$systemdsystemunitdir"; then
643 echo "smartd initd script: [[disabled]]" >&AS_MESSAGE_FD
645 if test -n "$systemdsystemunitdir"; then
646 echo "smartd systemd file: `eval eval eval echo $systemdsystemunitdir`/smartd.service" >&AS_MESSAGE_FD
647 if test -n "$systemdenvfile"; then
648 echo "smartd environ file: `eval eval eval echo $systemdenvfile`" >&AS_MESSAGE_FD
650 echo "smartd environ file: [[disabled]]" >&AS_MESSAGE_FD
653 if test -n "$savestates"; then
654 echo "smartd save files: `eval eval eval echo $savestates`MODEL-SERIAL.TYPE.state" >&AS_MESSAGE_FD
656 echo "smartd save files: [[disabled]]" >&AS_MESSAGE_FD
658 if test -n "$attributelog"; then
659 echo "smartd attribute logs: `eval eval eval echo $attributelog`MODEL-SERIAL.TYPE.csv" >&AS_MESSAGE_FD
661 echo "smartd attribute logs: [[disabled]]" >&AS_MESSAGE_FD
663 echo "libcap-ng support: $use_libcap_ng" >&AS_MESSAGE_FD
665 linux*) echo "SELinux support: ${with_selinux-no}" >&AS_MESSAGE_FD ;;
669 echo "-----------------------------------------------------------------------------" >&AS_MESSAGE_FD
671 # TODO: Remove after smartmontools 6.5
672 case "$host:${with_solaris_sparc_ata+set}" in
675 Legacy ATA support is no longer enabled by default on Solaris SPARC.
676 The required source file 'os_solaris_ata.s' is no longer included in
677 the source tarball but still available in the SVN repository.
678 Use option '--with-solaris-sparc-ata' to enable legacy ATA support.
679 Use option '--without-solaris-sparc-ata' to suppress this warning.])