1# 2# $Id: configure.ac 5155 2020-12-30 16:49:18Z chrfranke $ 3# 4dnl Process this file with autoconf to produce a configure script. 5AC_PREREQ([2.60]) 6AC_INIT([smartmontools], [7.2], [smartmontools-support@listi.jpberlin.de]) 7AM_INIT_AUTOMAKE([1.10 foreign]) 8 9# Version of drive database branch 10smartmontools_drivedb_version=7.2 11 12smartmontools_cvs_tag=`echo '$Id: configure.ac 5155 2020-12-30 16:49:18Z chrfranke $'` 13smartmontools_release_date=2020-12-30 14smartmontools_release_time="16:48:30 UTC" 15 16AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_ARGS, "$ac_configure_args", [smartmontools Configure Arguments]) 17AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_DATE, "$smartmontools_release_date", [smartmontools Release Date]) 18AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_TIME, "$smartmontools_release_time", [smartmontools Release Time]) 19AC_DEFINE_UNQUOTED(CONFIG_H_CVSID, "$smartmontools_cvs_tag", [smartmontools CVS Tag]) 20AC_DEFINE_UNQUOTED(PACKAGE_HOMEPAGE, "https://www.smartmontools.org/", [smartmontools Home Page]) 21 22AC_CONFIG_SRCDIR([smartctl.cpp]) 23AC_CONFIG_HEADERS([config.h]) 24 25AM_MAINTAINER_MODE 26 27AC_LANG([C++]) 28dnl Checks for programs. 29AC_PROG_CXX 30AM_PROG_AS 31AC_PROG_INSTALL 32 33m4_pattern_forbid([^PKG_PROG_]) 34if test "$cross_compiling" = "no"; then 35 m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], 36 [AC_MSG_WARN([m4/pkg.m4 missing, systemd detection disabled])]) 37fi 38 39AC_ARG_VAR(NM, [Symbol list command]) 40AC_ARG_VAR(WINDMC, [Windows message compiler command]) 41AC_ARG_VAR(WINDRES, [Windows resource compiler command]) 42AC_ARG_VAR(MAKENSIS, [NSIS compiler command]) 43 44AC_CANONICAL_HOST 45 46AC_CHECK_TOOL(NM, [nm]) 47case "${host}" in 48 *-*-mingw*) 49 AC_CHECK_TOOL(WINDMC, [windmc]) 50 AC_CHECK_TOOL(WINDRES, [windres]) 51 52 AC_MSG_CHECKING([for makensis]) 53 if test -z "$MAKENSIS"; then 54 if test -n "$PROGRAMFILES" && "$PROGRAMFILES/NSIS/makensis" -VERSION >/dev/null 2>&1; then 55 MAKENSIS="$PROGRAMFILES/NSIS/makensis" 56 elif makensis -VERSION >/dev/null 2>&1; then 57 MAKENSIS=makensis 58 fi 59 fi 60 AC_MSG_RESULT([${MAKENSIS:-no}]) 61 ;; 62esac 63 64# Check for SVN. 65AC_MSG_CHECKING([whether this is a build from SVN]) 66is_svn_build=no 67svn_deps= 68if test -f "$srcdir/.svn/wc.db"; then 69 # SVN >= 1.7 working copy 70 svn_deps='${srcdir}/.svn/wc.db' 71fi 72if test -n "$svn_deps"; then 73 is_svn_build=unknown 74 if (cd "$srcdir" && svn --version && svnversion && svn info) >/dev/null 2>&1; then 75 is_svn_build=yes 76 fi 77fi 78AC_SUBST([svn_deps]) 79AM_CONDITIONAL(IS_SVN_BUILD, [test "$is_svn_build" = "yes"]) 80AC_MSG_RESULT([$is_svn_build]) 81 82# Note: On Linux, clock_gettime() requires -lrt which implies -lpthreads 83# Check omitted for now, gettimeofday() provides reasonable precision 84# AC_SEARCH_LIBS(clock_gettime, rt) 85 86# Checks for header files. 87AC_CHECK_HEADERS([locale.h]) 88AC_CHECK_HEADERS([byteswap.h], [], [], []) 89 90case "$host" in 91 *-*-freebsd*|*-*-dragonfly*|*-*-kfreebsd*-gnu*) 92 # Check for FreeBSD twe and twa include files 93 AC_CHECK_HEADERS([sys/tweio.h sys/twereg.h sys/tw_osl_ioctl.h]) 94 # Check for the FreeBSD CCISS system header and use internal one if not found 95 AC_CHECK_HEADERS([dev/ciss/cissio.h], 96 [AC_DEFINE([CISS_LOCATION],[<dev/ciss/cissio.h>],[freebsd ciss header location])], 97 [AC_DEFINE([CISS_LOCATION],["cissio_freebsd.h"],[freebsd ciss header location])]) 98 ;; 99 *-*-linux*) 100 # <linux/compiler.h> is needed for cciss_ioctl.h at least on SuSE LINUX 101 AC_CHECK_HEADERS([sys/sysmacros.h linux/compiler.h]) 102 # Check for Linux CCISS include file 103 AC_CHECK_HEADERS([linux/cciss_ioctl.h], [], [], [AC_INCLUDES_DEFAULT 104#ifdef HAVE_LINUX_COMPILER_H 105# include <linux/compiler.h> 106#endif 107]) 108 ;; 109 *-*-netbsd*|*-*-openbsd*) 110 AC_CHECK_HEADERS([dev/ata/atavar.h]) 111 ;; 112esac 113 114# Checks for typedefs, and compiler characteristics. 115AC_CHECK_TYPES([__int128]) 116AC_TYPE_LONG_DOUBLE_WIDER 117 118# Checks for library functions. 119AC_CHECK_FUNCS([getopt_long], [need_getopt_long=no], [need_getopt_long=yes]) 120AM_CONDITIONAL(NEED_GETOPT_LONG, [test "$need_getopt_long" = "yes"]) 121 122AC_CHECK_FUNCS([clock_gettime ftime gettimeofday]) 123 124# Check byte ordering (defines WORDS_BIGENDIAN) 125AC_C_BIGENDIAN 126 127# check for __attribute__((packed)) 128# (sizeof() check is required to avoid false positives if other 129# __attribute__((x)) are supported) 130AC_MSG_CHECKING([whether $CXX supports __attribute__((packed))]) 131AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[ 132 struct s { char a; short b; } __attribute__((packed)); 133 typedef char t[sizeof(struct s) == 3 ? 1 : -1];]])], 134 [gcc_have_attr_packed=yes], [gcc_have_attr_packed=no]) 135AC_SUBST(gcc_have_attr_packed) 136if test "$gcc_have_attr_packed" = "yes"; then 137 AC_DEFINE(HAVE_ATTR_PACKED, 1, [Define to 1 if C++ compiler supports __attribute__((packed))]) 138fi 139AC_MSG_RESULT([$gcc_have_attr_packed]) 140 141AC_SUBST(CPPFLAGS) 142AC_SUBST(LDFLAGS) 143AC_SUBST(ASFLAGS) 144 145initddir= 146AC_ARG_WITH(initscriptdir, 147 [AS_HELP_STRING([--with-initscriptdir=@<:@DIR|no@:>@], [Location of init scripts [no]])], 148 [ case "$withval" in 149 auto|yes) AC_MSG_ERROR(['--with-initscriptdir=$withval' is no longer supported]) ;; 150 no) ;; 151 *) initddir="$withval" ;; 152 esac 153 ]) 154AC_SUBST(initddir) 155AM_CONDITIONAL(INSTALL_INITSCRIPT, [test -n "$initddir"]) 156 157# use different init script templates for different OS 158case "${host}" in 159 *-*-freebsd*) 160 initdfile="smartd.freebsd.initd" 161 ;; 162 *-apple-darwin*) 163 initdfile="com.smartmontools.smartd.plist" 164 ;; 165 *-*-cygwin*) 166 initdfile="smartd.cygwin.initd" 167 ;; 168 *) 169 initdfile="smartd.initd" 170 ;; 171esac 172AC_SUBST(initdfile) 173 174AC_ARG_WITH(exampledir, 175 [AS_HELP_STRING([--with-exampledir=DIR], [Location of example scripts [DOCDIR/examplescripts]])], 176 [exampledir="$withval"], [exampledir='${docdir}/examplescripts']) 177AC_SUBST(exampledir) 178 179drivedbdir='${datadir}/${PACKAGE}' 180AC_ARG_WITH(drivedbdir, 181 [AS_HELP_STRING([--with-drivedbdir@<:@=DIR|yes|no@:>@], [Location of drive database file [DATADIR/smartmontools]])], 182 [case "$withval" in yes) ;; no) drivedbdir= ;; *) drivedbdir="$withval" ;; esac]) 183AC_SUBST(drivedbdir) 184AM_CONDITIONAL(ENABLE_DRIVEDB, [test -n "$drivedbdir"]) 185 186drivedb_version=$smartmontools_drivedb_version 187AC_ARG_WITH(update-smart_drivedb, 188 [AS_HELP_STRING([--with-update-smart-drivedb@<:@=yes|no|X.Y@:>@], 189 [Install update-smart-drivedb script (and backport it to branches/RELEASE_X_Y_DRIVEDB) [yes]])], 190 [ case "$withval" in 191 yes|no) ;; 192 5.4[[0-3]]|6.[[0-9]]) drivedb_version=$withval; with_update_smart_drivedb=yes ;; 193 *) AC_MSG_ERROR([Invalid drivedb branch version: $withval]) ;; 194 esac 195 ], 196 [with_update_smart_drivedb=yes]) 197test -n "$drivedbdir" || with_update_smart_drivedb=no 198AC_SUBST(with_update_smart_drivedb) 199AM_CONDITIONAL(ENABLE_UPDATE_SMART_DRIVEDB, [test "$with_update_smart_drivedb" = "yes"]) 200 201gnupg="gpg" 202# Also check for '--with-gnupg[=yes]' because 'yes' is a valid command with infinite output 203AC_ARG_WITH(gnupg, 204 [AS_HELP_STRING([--with-gnupg@<:@=FILE|yes|no@:>@], [GnuPG used to verify drivedb.h [gpg]])], 205 [case "$withval" in yes) ;; no) gnupg= ;; *) gnupg="$withval" ;; esac], []) 206AC_SUBST(gnupg) 207 208case "$with_update_smart_drivedb:$gnupg" in 209 no:?*) 210 AC_MSG_ERROR([ 211'--without-update-smart-drivedb' now requires '--without-gnupg'. 212NEWS: update-smart-drivedb now verifies the downloaded drivedb.h file with GnuPG.]) 213 ;; 214esac 215 216AC_ARG_WITH(smartdscriptdir, 217 [AS_HELP_STRING([--with-smartdscriptdir=DIR], [Location of smartd_warning.sh script [SYSCONFDIR]])], 218 [smartdscriptdir="$withval"], [smartdscriptdir='${sysconfdir}']) 219AC_SUBST(smartdscriptdir) 220 221AC_ARG_WITH(smartdplugindir, 222 [AS_HELP_STRING([--with-smartdplugindir=@<:@DIR|no@:>@], 223 [Location of smartd_warning.sh plugin scripts [SMARTDSCRIPTDIR/smartd_warning.d]])], 224 [smartdplugindir=; test "$withval" != "no" && smartdplugindir="$withval"], 225 [smartdplugindir='${smartdscriptdir}/smartd_warning.d']) 226AC_SUBST(smartdplugindir) 227 228AC_ARG_WITH(scriptpath, 229 [AS_HELP_STRING([--with-scriptpath=@<:@PATH|no@:>@], 230 [PATH variable set within scripts [/usr/local/bin:/usr/bin:/bin]])], 231 [scriptpath=; test "$withval" != "no" && scriptpath="$withval"], 232 [scriptpath="/usr/local/bin:/usr/bin:/bin"]) 233AC_SUBST(scriptpath) 234AM_CONDITIONAL(ENABLE_SCRIPTPATH, [test -n "$scriptpath"]) 235 236savestates= 237AC_ARG_WITH(savestates, 238 [AS_HELP_STRING([--with-savestates@<:@=PREFIX|yes|no@:>@], 239 [Enable default smartd state files [no] (yes=LOCALSTATEDIR/lib/smartmontools/smartd.)])], 240 [case "$withval" in yes) savestates='${localstatedir}/lib/${PACKAGE}/smartd.' ;; 241 no) ;; *) savestates="$withval" ;; esac]) 242savestatesdir="${savestates%/*}" 243AC_SUBST(savestates) 244AC_SUBST(savestatesdir) 245AM_CONDITIONAL(ENABLE_SAVESTATES, [test -n "$savestates"]) 246 247attributelog= 248AC_ARG_WITH(attributelog, 249 [AS_HELP_STRING([--with-attributelog@<:@=PREFIX|yes|no@:>@], 250 [Enable default smartd attribute log files [no] (yes=LOCALSTATEDIR/lib/smartmontools/attrlog.)])], 251 [case "$withval" in yes) attributelog='${localstatedir}/lib/${PACKAGE}/attrlog.' ;; 252 no) ;; *) attributelog="$withval" ;; esac]) 253attributelogdir="${attributelog%/*}" 254AC_SUBST(attributelog) 255AC_SUBST(attributelogdir) 256AM_CONDITIONAL(ENABLE_ATTRIBUTELOG, [test -n "$attributelog"]) 257 258AC_ARG_ENABLE(sample, 259 [AS_HELP_STRING([--enable-sample], [Enables appending .sample to the installed smartd rc script and configuration file])], 260 [smartd_suffix=; test "$enableval" = "yes" && smartd_suffix=".sample"], 261 [smartd_suffix=;]) 262AC_SUBST(smartd_suffix) 263 264AC_ARG_ENABLE([scsi-cdb-check], 265 [AS_HELP_STRING([--enable-scsi-cdb-check], [do sanity check on each SCSI cdb])], 266 [ if test "$enableval" = "yes"; then 267 AC_DEFINE(SCSI_CDB_CHECK, 1, [Define to 1 to enable check on each SCSI cdb]) 268 fi 269 ],[]) 270 271AC_ARG_ENABLE([fast-lebe], 272 [AS_HELP_STRING([--disable-fast-lebe], [use generic little-endian/big-endian code instead])], 273 [ if test "$enableval" = "no"; then 274 AC_DEFINE(IGNORE_FAST_LEBE, 1, [Define to 1 to use generic LE/BE code instead]) 275 fi 276 ],[]) 277 278AC_ARG_WITH(os-deps, 279 [AS_HELP_STRING([--with-os-deps='os_module.o ...'], [Specify OS dependent module(s) [guessed]])], 280 [ for x in $with_os_deps; do 281 case $x in 282 *.o) ;; 283 *) AC_MSG_ERROR([non-object file specified by --with-os-deps]) ;; 284 esac 285 done 286 ],[]) 287 288AC_ARG_WITH(selinux, 289 [AS_HELP_STRING([--with-selinux@<:@=yes|no@:>@], [Enables SELinux support [no]])], 290 [ if test "$withval" = "yes"; then 291 AC_CHECK_HEADERS([selinux/selinux.h], [], [AC_MSG_ERROR([Missing SELinux header files])]) 292 AC_CHECK_LIB(selinux, matchpathcon, [], [AC_MSG_ERROR([Missing or incorrect SELinux library files])]) 293 fi 294 ],[]) 295 296AC_ARG_WITH(libcap-ng, 297 [AS_HELP_STRING([--with-libcap-ng@<:@=auto|yes|no@:>@], [Add Libcap-ng support to smartd [auto]])], 298 [], [with_libcap_ng=auto]) 299 300use_libcap_ng=no 301case "$with_libcap_ng:$host_os" in 302 auto:linux*|yes:*) 303 AC_CHECK_HEADERS([cap-ng.h], [AC_CHECK_LIB([cap-ng], [capng_clear], 304 [AC_DEFINE(HAVE_LIBCAP_NG, 1, 305 [Define to 1 if you have the `cap-ng' library (-lcap-ng).]) dnl `vim syntax 306 CAPNG_LDADD="-lcap-ng"; use_libcap_ng=yes], 307 [AC_MSG_ERROR([libcap-ng headers found but library is missing])])], 308 [test "$with_libcap_ng" != "yes" || AC_MSG_ERROR([Missing libcap-ng header files])]) 309 ;; 310esac 311AC_SUBST(CAPNG_LDADD) 312 313AC_ARG_WITH(libsystemd, 314 [AS_HELP_STRING([--with-libsystemd@<:@=auto|yes|no@:>@], 315 [Add systemd 'Type=notify' support to smartd [auto]])], 316 [], [with_libsystemd=auto]) 317 318use_libsystemd=no 319case "$with_libsystemd:$host_os" in 320 auto:linux*|yes:*) 321 AC_CHECK_HEADERS([systemd/sd-daemon.h], [AC_CHECK_LIB([systemd], [sd_notify], 322 [AC_DEFINE(HAVE_LIBSYSTEMD, 1, 323 [Define to 1 if you have the `systemd' library (-lsystemd).]) dnl `vim syntax 324 SYSTEMD_LDADD="-lsystemd"; use_libsystemd=yes], 325 [AC_MSG_ERROR([libsystemd headers found but library is missing])])], 326 [test "$with_libsystemd" != "yes" || AC_MSG_ERROR([Missing libsystemd header files])]) 327 ;; 328esac 329AC_SUBST(SYSTEMD_LDADD) 330 331AC_ARG_WITH(systemdsystemunitdir, 332 [AS_HELP_STRING([--with-systemdsystemunitdir@<:@=DIR|auto|yes|no@:>@], [Location of systemd service files [auto]])], 333 [], [with_systemdsystemunitdir=auto]) 334 335systemdsystemunitdir= 336case "$with_systemdsystemunitdir:$use_libsystemd" in 337 auto:yes|yes:yes) 338 if test -n "$PKG_CONFIG"; then 339 AC_MSG_CHECKING([for systemdsystemunitdir]) 340 systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd 2>/dev/null` 341 AC_MSG_RESULT([${systemdsystemunitdir:-no}]) 342 fi 343 case "$with_systemdsystemunitdir:$sysconfdir:$systemdsystemunitdir" in 344 yes:*:) AC_MSG_ERROR([Location of systemd service files not found]) ;; 345 yes:*:*|auto:*:|auto:/etc:*) ;; 346 *) systemdsystemunitdir='${prefix}'$systemdsystemunitdir ;; 347 esac ;; 348 auto:*|no:*) ;; 349 *:yes) systemdsystemunitdir="$with_systemdsystemunitdir" ;; 350 *) AC_MSG_ERROR(['--with-systemdsystemunitdir=$with_systemdsystemunitdir' now requires '--with-libsystemd']) ;; 351esac 352AC_SUBST(systemdsystemunitdir) 353AM_CONDITIONAL(INSTALL_SYSTEMDUNIT, [test -n "$systemdsystemunitdir"]) 354 355AC_ARG_WITH(systemdenvfile, 356 [AS_HELP_STRING([--with-systemdenvfile@<:@=FILE|auto|yes|no@:>@], [Path of systemd EnvironmentFile [auto]])], 357 [], [with_systemdenvfile=auto]) 358 359systemdenvfile= 360case "$with_systemdenvfile:$cross_compiling:$systemdsystemunitdir" in 361 auto:no:?*|yes:*:?*) 362 AC_MSG_CHECKING([for path of systemd EnvironmentFile]) 363 for dir in sysconfig default; do 364 if test -d /etc/$dir; then 365 systemdenvfile='${sysconfdir}'/$dir/smartmontools 366 break 367 fi 368 done 369 AC_MSG_RESULT([${systemdenvfile:-no}]) 370 case "$with_systemdenvfile:$systemdenvfile" in 371 yes:) AC_MSG_ERROR([Path of systemd EnvironmentFile not found]) ;; 372 esac ;; 373 auto:*|no:*) ;; 374 *:*:) AC_MSG_ERROR([Location of systemd service files not found]) ;; 375 *) systemdenvfile="$with_systemdenvfile" 376esac 377AC_SUBST(systemdenvfile) 378 379# TODO: Remove when NVMe support is no longer EXPERIMENTAL 380AC_ARG_WITH(nvme-devicescan, 381 [AS_HELP_STRING([--with-nvme-devicescan@<:@=yes|no@:>@], 382 [Include NVMe devices in smartd DEVICESCAN [Linux,Windows:yes;Others:no]])]) 383 384# TODO: Remove after smartmontools 7.3 385AC_ARG_WITH(solaris-sparc-ata, 386 [AS_HELP_STRING([--with-solaris-sparc-ata@<:@=yes|no@:>@], 387 [Enable legacy ATA support on Solaris SPARC (requires os_solaris_ata.s from SVN repository) [no]])]) 388 389case "$host:$with_solaris_sparc_ata" in 390 sparc-*-solaris*:yes) 391 if test ! -f "$srcdir/os_solaris_ata.s"; then 392 AC_MSG_ERROR([Missing source file: $srcdir/os_solaris_ata.s 393This file is no longer included in the source tarball but still 394available in the SVN repository.]) 395 fi 396 AC_DEFINE(WITH_SOLARIS_SPARC_ATA, 1, [Define to 1 to enable legacy ATA support on Solaris SPARC.]) 397 ;; 398esac 399 400AC_ARG_WITH(signal-func, 401 [AS_HELP_STRING([--with-signal-func=@<:@sigaction|sigset|signal@:>@], 402 [Function to set signal(2) action [sigaction]])], 403 [], [with_signal_func=sigaction]) 404 405case "$host:$with_signal_func" in 406 *-*-mingw*:*) ;; 407 *:sigaction) 408 AC_CHECK_FUNCS([sigaction], [], AC_MSG_ERROR([Missing function 'sigaction()'. 409Try '--with-signal-func=sigset' or '--with-signal-func=signal'. 410Please send info about your system to $PACKAGE_BUGREPORT.])) ;; 411 *:sigset) 412 AC_CHECK_FUNCS([sigset], [], AC_MSG_ERROR([Missing function 'sigset()'])) ;; 413 *:signal) ;; 414 *) AC_MSG_ERROR([Invalid option '--with-signal-func=$with_signal_func']) ;; 415esac 416 417case "$host_os: $CPPFLAGS $CXXFLAGS" in 418 mingw*:*\ -[[DU]]__USE_MINGW_ANSI_STDIO*) 419 ;; 420 mingw*:*) 421 # Older MinGW (4.6.3) do not properly define PRI?64 if __USE_MINGW_ANSI_STDIO is set. 422 # Newer MinGW (4.9.1) set __USE_MINGW_ANSI_STDIO in first C++ include which may be too late. 423 # Set __USE_MINGW_ANSI_STDIO always and fail if not fully supported. 424 AC_MSG_CHECKING([whether $CXX supports __USE_MINGW_ANSI_STDIO]) 425 save_CXXFLAGS=$CXXFLAGS 426 CXXFLAGS="-Wformat -Werror -D__USE_MINGW_ANSI_STDIO" 427 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 428 #define __STDC_FORMAT_MACROS 1 429 #include <inttypes.h> 430 #include <stdio.h> 431 void f(char * buf1, char * buf2, size_t size) { 432 snprintf(buf1, size, "%lld", 42LL); 433 snprintf(buf2, size, "%" PRId64, (int64_t)42); 434 }]])], 435 [result=yes], [result=no]) 436 AC_MSG_RESULT([$result]) 437 if test "$result" != "yes"; then 438 AC_MSG_ERROR([ 439This version of $CXX does not support __USE_MINGW_ANSI_STDIO. 440Use option 'CPPFLAGS=-U__USE_MINGW_ANSI_STDIO' to skip this check. 441Please send info about your system to $PACKAGE_BUGREPORT. 442]) 443 fi 444 CXXFLAGS="-D__USE_MINGW_ANSI_STDIO $save_CXXFLAGS" 445 ;; 446esac 447 448AC_ARG_WITH(mingw-aslr, 449 [AS_HELP_STRING([--with-mingw-aslr@<:@=auto|yes|low|no@:>@], [Enable ASLR for MinGW executables [auto]])], 450 [], [with_mingw_aslr=auto]) 451 452case "$host:${LDFLAGS+set}" in 453 *-*-mingw*:) # MinGW defaults: link statically and indicate DEP and TS compatibility 454 LDFLAGS="-static -Wl,--nxcompat,--tsaware" ;; 455esac 456 457# ASLR related issues of MinGW-w64 toolchain and workarounds: 458# 1. '--dynamicbase' only sets DYNAMIC_BASE flag but does not enable relocation info: 459# Add '-pie' (works despite 'man ld' says: "... currently only supported on ELF platforms") 460# 2. If both '-static' and '-pie' are specified, the entry point is not set properly: 461# Specify entry point with '-emainCRTStartup' or '-e_mainCRTStartup'. 462# 3. Some versions of '*-w64-mingw32-g++' ignore '-pie' if '-static' is also specified: 463# Pass '-pie' directly to the linker with '-Wl,-pie'. 464# 4. Linkage of some versions of 'libstdc++.a' fail with "relocation overflow" if a high 465# '--image-base' is used: Do not use '--high-entropy-va' in these cases. 466 467case "$host:$with_mingw_aslr" in 468 x86_64-*-mingw*:auto) 469 AC_MSG_CHECKING([whether $CXX supports --high-entropy-va]) 470 save_LDFLAGS=$LDFLAGS 471 LDFLAGS="$LDFLAGS -Wl,--dynamicbase,-pie,-emainCRTStartup,--high-entropy-va,--image-base,0x140000000" 472 # Link libstdc++ to detect MinGW-w64 problems with high '--image-base' 473 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 474 #include <string> 475 std::string s(42, '.');]])], 476 [with_mingw_aslr=yes], [with_mingw_aslr=no]) 477 LDFLAGS=$save_LDFLAGS 478 AC_MSG_RESULT([$with_mingw_aslr]) 479 test "$with_mingw_aslr" = "yes" || with_mingw_aslr=low 480 ;; 481esac 482 483case "$host:$with_mingw_aslr" in 484 x86_64-*-mingw*:yes) 485 LDFLAGS="$LDFLAGS -Wl,--dynamicbase,-pie,-emainCRTStartup,--high-entropy-va,--image-base,0x140000000" ;; 486 x86_64-*-mingw*:low) 487 LDFLAGS="$LDFLAGS -Wl,--dynamicbase,-pie,-emainCRTStartup" ;; 488 *-*-mingw*:auto|*-*-mingw*:yes|*-*-mingw*:low) 489 LDFLAGS="$LDFLAGS -Wl,--dynamicbase,-pie,-e_mainCRTStartup" ;; 490esac 491 492os_win32_manifest= 493case "$host" in 494 *-*-mingw*) 495 # Newer MinGW may add a default manifest 496 AC_MSG_CHECKING([whether $CXX adds an application manifest]) 497 cc_adds_manifest=no 498 AC_LINK_IFELSE([AC_LANG_PROGRAM()], [ 499 if "$WINDRES" -O rc conftest.exe 2>/dev/null | grep '^1.*RT_MANIFEST' >/dev/null 2>&1; then 500 cc_adds_manifest=incomplete 501 # Manifest must provide a Win 10 compatibility ID 502 if "$WINDRES" -O rc conftest.exe 2>/dev/null | grep '{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}' >/dev/null 2>&1; then 503 cc_adds_manifest=yes 504 fi 505 fi], 506 [AC_MSG_ERROR([test compile failed])]) 507 AC_MSG_RESULT([$cc_adds_manifest]) 508 test "$cc_adds_manifest" = "yes" || os_win32_manifest='os_win32/default.manifest' 509 ;; 510esac 511 512AC_ARG_WITH(cxx11-option, 513 [AS_HELP_STRING([--with-cxx11-option=@<:@OPTION|auto|no@:>@], 514 [Compiler option to enable C++11 support for future versions of smartmontools, 'no' if unsupported [auto]])], 515 [], [with_cxx11_option=auto]) 516 517check_cxx11_support() 518{ 519 save_CXXFLAGS=$CXXFLAGS 520 CXXFLAGS=$1 521 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 522 #if __cplusplus < 201103L 523 #error false 524 #endif 525 // use some C++11 features (and return v * 42 :-) 526 auto cxx11(long v) noexcept -> decltype(v) { 527 typedef decltype(v) t; t r = v; 528 static const t a[] = { -7, -1, 1, 2, 3 }; 529 static_assert(sizeof(r) == sizeof(a[0]), "fail"); 530 auto f = [](t x, t y){ return x * y; }; 531 for (const auto & e : a) r = f(r, e); 532 return r; 533 }]])], 534 [CXXFLAGS=$save_CXXFLAGS; return 0], [CXXFLAGS=$save_CXXFLAGS; return 1]) 535} 536 537case "$with_cxx11_option" in 538 no) ;; 539 auto) 540 AC_MSG_CHECKING([for $CXX option to accept C++11]) 541 with_cxx11_option=unknown 542 for option in "" "-std=gnu++11" "-std=gnu++0x" "-std=c++11" "-std=c++0x"; do 543 if check_cxx11_support "$option"; then with_cxx11_option=$option; break; fi 544 done 545 AC_MSG_RESULT([${with_cxx11_option:-none needed}]) 546 test "$with_cxx11_option" != "unknown" || AC_MSG_ERROR([ 547This version of smartmontools does not use C++11 features, but future 548versions possibly will. 549This script was unable to determine a compiler option to enable C++11. 550Use option '--with-cxx11-option=OPTION' to specify the compiler option 551(it will be used in the actual build only if '--with-cxx11-regex' is set). 552Use option '--without-cxx11-option' to suppress this error message if the 553compiler lacks C++11 support. 554In both cases, please send info about compiler and platform to 555$PACKAGE_BUGREPORT - Thanks!]) 556 ;; 557 *) 558 AC_MSG_CHECKING([whether $CXX $with_cxx11_option accepts C++11]) 559 res=no; check_cxx11_support "$with_cxx11_option" && res=yes 560 AC_MSG_RESULT([$res]) 561 test "$res" = "yes" || AC_MSG_ERROR([$CXX $with_cxx11_option does not accept C++11]) 562 ;; 563esac 564 565AC_ARG_WITH(cxx11-regex, 566 [AS_HELP_STRING([--with-cxx11-regex@<:@=yes|no@:>@], 567 [Use C++11 std::regex instead of POSIX regex(3) [no]])]) 568 569need_regex=no 570if test "$with_cxx11_regex" = "yes"; then 571 AC_DEFINE(WITH_CXX11_REGEX, 1, [Define to 1 to use C++11 std::regex instead of POSIX regex(3)]) 572 case "$with_cxx11_option: $CXXFLAGS " in 573 no:*) AC_MSG_ERROR(['--with-cxx11-regex' requires C++11 support]) ;; 574 ?*:*\ $with_cxx11_option\ *) ;; 575 ?*:*) CXXFLAGS="$CXXFLAGS $with_cxx11_option" ;; 576 esac 577else 578 AC_CHECK_FUNCS([regcomp], [], [need_regex=yes]) 579fi 580AM_CONDITIONAL(NEED_REGEX, [test "$need_regex" = "yes"]) 581 582# TODO: Remove after smartmontools 7.2 583AC_ARG_WITH(working-snprintf, 584 [AS_HELP_STRING([--with-working-snprintf], [(removed)])], 585 [ if test "$withval" != "yes"; then 586 AC_MSG_ERROR([ 587The option '--without-working-snprintf' is no longer supported. 588If you still need support for pre-C99 snprintf(), please inform 589$PACKAGE_BUGREPORT. 590]) 591 fi]) 592 593AC_SUBST(releaseversion,['${PACKAGE}-${VERSION}']) 594AC_SUBST(smartmontools_release_date) 595AC_SUBST(smartmontools_release_time) 596 597# Set platform-specific modules and symbols 598os_libs= 599os_dltools='curl wget lynx svn' 600os_mailer=mail 601os_hostname="'hostname' 'uname -n'" 602os_dnsdomainname= 603os_nisdomainname="'domainname'" 604os_darwin=no 605os_solaris=no 606os_win32=no 607os_win32_mingw=no 608os_win64=no 609os_man_filter= 610os_nvme_devicescan= 611case "${host}" in 612 *-*-linux*) 613 os_deps='os_linux.o cciss.o dev_areca.o' 614 os_dnsdomainname="'dnsdomainname' 'hostname -d'" 615 os_nisdomainname="'nisdomainname' 'hostname -y' 'domainname'" 616 os_man_filter=Linux 617 os_nvme_devicescan=yes 618 ;; 619 *-*-freebsd*|*-*-dragonfly*|*-*-kfreebsd*-gnu*) 620 os_deps='os_freebsd.o cciss.o dev_areca.o' 621 os_libs='-lcam -lsbuf' 622 os_dltools='fetch curl wget lynx svn' 623 AC_CHECK_LIB(usb, libusb20_dev_get_device_desc) 624 os_man_filter=FreeBSD 625 os_nvme_devicescan=no 626 ;; 627 sparc-*-solaris*) 628 os_deps='os_solaris.o' 629 test "$with_solaris_sparc_ata" = "yes" \ 630 && os_deps="$os_deps os_solaris_ata.o" 631 os_mailer='mailx' 632 os_solaris=yes 633 os_man_filter=Solaris 634 ;; 635 *-pc-solaris*) 636 os_deps='os_solaris.o' 637 os_mailer='mailx' 638 os_solaris=yes 639 os_man_filter=Solaris 640 ;; 641 *-*-netbsd*) 642 os_deps='os_netbsd.o' 643 os_libs='-lutil' 644 os_man_filter=NetBSD 645 os_nvme_devicescan=no 646 ;; 647 *-*-openbsd*) 648 os_deps='os_openbsd.o' 649 os_libs='-lutil' 650 os_dltools='curl wget lynx ftp svn' 651 os_man_filter=OpenBSD 652 ;; 653 *-*-cygwin*) 654 os_deps='os_win32.o dev_areca.o' 655 os_mailer='email' 656 os_hostname="'hostname' 'uname -n' 'echo "'"${HOSTNAME?unset}"'"'" 657 os_dnsdomainname="'dnsdomainname' 'hostname -d' 'echo "'"${USERDNSDOMAIN?unset}"'"'" 658 os_nisdomainname= 659 os_win32=yes 660 os_man_filter=Cygwin 661 os_nvme_devicescan=yes 662 ;; 663 x86_64-*-mingw*) 664 os_deps='os_win32.o dev_areca.o' 665 os_win32=yes 666 os_win32_mingw=yes 667 os_win64=yes 668 os_man_filter=Windows 669 os_nvme_devicescan=yes 670 ;; 671 *-*-mingw*) 672 os_deps='os_win32.o dev_areca.o' 673 os_win32=yes 674 os_win32_mingw=yes 675 os_man_filter=Windows 676 os_nvme_devicescan=yes 677 ;; 678 *-*-darwin*) 679 os_deps='os_darwin.o' 680 os_libs='-framework CoreFoundation -framework IOKit' 681 os_darwin=yes 682 os_man_filter=Darwin 683 os_nvme_devicescan=no 684 ;; 685 *-*-nto-qnx*) 686 os_deps='os_qnxnto.o' 687 ;; 688 *-*-os2-*) 689 os_deps='os_os2.o' 690 ;; 691 *) 692 os_deps='os_generic.o' 693 ;; 694esac 695 696# Replace if '--with-os-deps' was specified 697test -z "$with_os_deps" || os_deps="$with_os_deps" 698 699# Check if we need adapter to old interface (dev_legacy.cpp) 700os_src=`echo "${os_deps}"|sed -n 's,^\([[^ .]]*\)\.o.*$,\1.cpp,p'` 701AC_MSG_CHECKING([whether ${os_src} uses new interface]) 702if grep "smart_interface" "${srcdir}/${os_src}" >/dev/null 2>&1; then 703 os_new_interface=yes 704else 705 os_new_interface=no 706 os_deps="${os_deps} dev_legacy.o" 707 AC_DEFINE(OLD_INTERFACE, 1, [Define to 1 if os_*.cpp still uses the old interface]) 708fi 709AC_MSG_RESULT([$os_new_interface]) 710 711# TODO: Remove when NVMe support is no longer EXPERIMENTAL 712case "$os_nvme_devicescan:${with_nvme_devicescan+set}" in 713 no:|yes:) 714 AC_MSG_CHECKING([whether NVMe device scanning could be safely enabled]) 715 with_nvme_devicescan=$os_nvme_devicescan 716 AC_MSG_RESULT([$os_nvme_devicescan]) 717 os_nvme_devicescan=used ;; 718esac 719AC_SUBST(with_nvme_devicescan) 720if test "$with_nvme_devicescan" = "yes"; then 721 AC_DEFINE(WITH_NVME_DEVICESCAN, 1, [Define to 1 to include NVMe devices in smartd DEVICESCAN.]) 722fi 723 724AC_SUBST([os_deps]) 725AC_SUBST([os_libs]) 726AC_SUBST([os_dltools]) 727AC_SUBST([os_mailer]) 728AC_SUBST([os_hostname]) 729AC_SUBST([os_dnsdomainname]) 730AC_SUBST([os_nisdomainname]) 731AC_SUBST([os_man_filter]) 732AC_SUBST([os_win32_manifest]) 733 734# Create drivedb.h update branch name from version: 5.41[.X] -> RELEASE_5_41_DRIVEDB 735DRIVEDB_BRANCH=`echo "$drivedb_version" | sed 's,^\([[0-9]]*\.[[0-9]]*\)\..*$,\1,' \ 736 | sed -n 's,^\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\)$,RELEASE_\1_\2_DRIVEDB,p'` 737if test -z "$DRIVEDB_BRANCH"; then 738 AC_MSG_ERROR([Unable to create DRIVEDB_BRANCH for version: $drivedb_version]) 739fi 740AC_SUBST([DRIVEDB_BRANCH]) 741 742# Enable platform-specific makefile sections 743AM_CONDITIONAL(OS_DARWIN, [test "$os_darwin" = "yes"]) 744AM_CONDITIONAL(OS_SOLARIS, [test "$os_solaris" = "yes"]) 745AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"]) 746AM_CONDITIONAL(OS_WIN32_MINGW, [test "$os_win32_mingw" = "yes"]) 747AM_CONDITIONAL(OS_WIN32_NSIS, [test -n "$MAKENSIS"]) 748AM_CONDITIONAL(OS_WIN64, [test "$os_win64" = "yes"]) 749 750if test "$GXX" = "yes"; then 751 orig_CXXFLAGS=$CXXFLAGS 752 # Add -Wall and -W[extra] if its not already specified 753 case " $CXXFLAGS " in 754 *\ -Wall\ *) ;; 755 *) CXXFLAGS="$CXXFLAGS -Wall" ;; 756 esac 757 case " $CXXFLAGS " in 758 *\ -W\ *|*\ -Wextra\ *) ;; 759 *) CXXFLAGS="$CXXFLAGS -W" ;; 760 esac 761 # Add -Wformat=2 (GCC 3.0) -fstack-protector[-strong] (GCC 4.1[4.9]) if supported 762 # and no -W or -f option was set in configure cmdline (TODO: -Wformat-signedness) 763 for option in "-Wformat=2" "-fstack-protector-strong" "-fstack-protector"; do 764 case " $orig_CXXFLAGS:$option" in *\ -W*:-W*|*\ -f*:-f*) continue ;; esac 765 case " $CXXFLAGS:$option" in *\ -fstack-p*:-fstack-p*) continue ;; esac 766 AC_MSG_CHECKING([whether $CXX supports $option]) 767 save_CXXFLAGS=$CXXFLAGS 768 CXXFLAGS="$CXXFLAGS $option" 769 AC_LINK_IFELSE([AC_LANG_PROGRAM()], [res=yes], [res=no; CXXFLAGS=$save_CXXFLAGS]) 770 AC_MSG_RESULT([$res]) 771 done 772else 773 # We are NOT using gcc, so enable host-specific compiler flags 774 case "${host}" in 775 sparc*-*-solaris*) 776 # Tell the Solaris/SPARC C++ compiler about packed ATA structures 777 case " $CXXFLAGS" in 778 *\ -xmemalign*) ;; 779 *) CXXFLAGS="-xmemalign=1i $CXXFLAGS" ;; 780 esac ;; 781 esac 782 case "${host}" in 783 *-*-solaris*) 784 # Turn on optimization if user has not explicitly set its value 785 case " $CXXFLAGS" in 786 *\ -xO*) ;; 787 *) CXXFLAGS="-xO2 $CXXFLAGS" ;; 788 esac 789 # Suppress trivial warnings 790 case " $CXXFLAGS" in 791 *\ -erroff*) ;; 792 *) CXXFLAGS="-erroff=%none,wbadinitl,wbadasgl,badargtypel2w,badargtype2w $CXXFLAGS" ;; 793 esac ;; 794 esac 795fi 796 797AC_MSG_CHECKING([whether _FORTIFY_SOURCE is predefined]) 798# Use COMPILE check to detect compiler presets and C*FLAGS. 799AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 800 #ifndef _FORTIFY_SOURCE 801 #error false 802 #endif]])], [res=yes], [res=no]) 803AC_MSG_RESULT([$res]) 804if test "$res" = "no"; then 805 # Heuristic to check for _FORTIFY_SOURCE=2 support. 806 # Done after check for -fstack-protector because this may add an additional lib. 807 # Note: Even if _FORTIFY_SOURCE is present in the include files, it may not be 808 # detected here because it is disabled for C++. 809 AC_MSG_CHECKING([whether $CXX supports _FORTIFY_SOURCE=2]) 810 save_CPPFLAGS=$CPPFLAGS 811 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-D_FORTIFY_SOURCE=2" 812 # Use LINK instead of COMPILE to make sure that the required lib is also present 813 # (does not work with LDFLAGS=-s). 814 AC_LINK_IFELSE([AC_LANG_SOURCE([[ 815 #include <string.h> 816 char buf[42]; 817 int main(int argc, char **argv) { 818 if (argc == 2) strcpy(buf, argv[1]); return buf[0]; 819 }]])], 820 [res=yes; $NM conftest$EXEEXT 2>/dev/null | grep '_strcpy_chk' >/dev/null 2>&1 || res=no], 821 [res=unknown]) 822 test "$res" = "yes" || CPPFLAGS=$save_CPPFLAGS 823 AC_MSG_RESULT([$res]) 824fi 825 826AC_DEFINE_UNQUOTED(SMARTMONTOOLS_BUILD_HOST, "${host}", [smartmontools Build Host]) 827 828AC_SUBST(CXXFLAGS) 829 830AC_CONFIG_FILES(Makefile) 831AC_OUTPUT 832AC_PROG_MAKE_SET 833 834# Note: Use `...` here as some shells do not properly parse '$(... case $x in X) ...)' 835info=` 836 echo "-----------------------------------------------------------------------------" 837 echo "${PACKAGE}-${VERSION} configuration:" 838 echo "host operating system: $host" 839 echo "C++ compiler: $CXX" 840 echo "C compiler: $CC" 841 echo "preprocessor flags: $CPPFLAGS" 842 echo "C++ compiler flags: $CXXFLAGS" 843 echo "C compiler flags: $CFLAGS" 844 echo "linker flags: $LDFLAGS" 845 echo "OS specific modules: $os_deps $os_libs $LIBS" 846 847 case "$host_os" in 848 mingw*) 849 echo "application manifest: ${os_win32_manifest:-built-in}" 850 echo "resource compiler: $WINDRES" 851 echo "message compiler: $WINDMC" 852 echo "NSIS compiler: $MAKENSIS" 853 if test -n "$drivedbdir"; then 854 echo "drive database file: EXEDIR/drivedb.h" 855 if test -n "$MAKENSIS"; then 856 echo "database update tool: EXEDIR/update-smart-drivedb.exe" 857 fi 858 else 859 echo "drive database file: [[disabled]]" 860 fi 861 if test -n "$savestates"; then 862 echo "smartd save files: \`eval eval eval echo $savestates\`MODEL-SERIAL.TYPE.state" 863 fi 864 if test -n "$attributelog"; then 865 echo "smartd attribute logs: \`eval eval eval echo $attributelog\`MODEL-SERIAL.TYPE.csv" 866 fi 867 echo "NVMe DEVICESCAN: ${with_nvme_devicescan-no}" 868 ;; 869 870 *) 871 echo "binary install path: \`eval eval eval echo $sbindir\`" 872 echo "man page install path: \`eval eval eval echo $mandir\`" 873 echo "doc file install path: \`eval eval eval echo $docdir\`" 874 echo "examples install path: \`eval eval eval echo $exampledir\`" 875 if test -n "$drivedbdir"; then 876 echo "drive database file: \`eval eval eval echo $drivedbdir\`/drivedb.h" 877 if test "$with_update_smart_drivedb" = "yes"; then 878 echo "database update script: \`eval eval eval echo $sbindir\`/update-smart-drivedb" 879 if test "$drivedb_version" = "$smartmontools_drivedb_version"; then 880 echo "database update branch: branches/$DRIVEDB_BRANCH" 881 else 882 echo "... backported to: branches/$DRIVEDB_BRANCH" 883 fi 884 echo "download tools: \`eval eval eval echo $os_dltools\`" 885 if test -n "$gnupg"; then 886 echo "GnuPG for verification: \`eval eval eval echo $gnupg\`" 887 else 888 echo "GnuPG for verification: [[disabled]]" 889 fi 890 else 891 echo "database update script: [[disabled]]" 892 fi 893 else 894 echo "drive database file: [[disabled]]" 895 fi 896 echo "local drive database: \`eval eval eval echo $sysconfdir\`/smart_drivedb.h" 897 echo "smartd config file: \`eval eval eval echo $sysconfdir\`/smartd.conf${smartd_suffix}" 898 echo "smartd warning script: \`eval eval eval echo $smartdscriptdir\`/smartd_warning.sh" 899 if test -n "$smartdplugindir"; then 900 echo "smartd plugin path: \`eval eval eval echo $smartdplugindir\`" 901 else 902 echo "smartd plugin path: [[disabled]]" 903 fi 904 if test -n "$scriptpath"; then 905 echo "PATH within scripts: \`eval eval eval echo $scriptpath\`" 906 else 907 echo "PATH within scripts: [[inherited]]" 908 fi 909 if test -n "$initddir"; then 910 echo "smartd initd script: \`eval eval eval echo $initddir\`/smartd" 911 elif test -z "$systemdsystemunitdir"; then 912 echo "smartd initd script: [[disabled]]" 913 fi 914 if test -n "$systemdsystemunitdir"; then 915 echo "smartd service file: \`eval eval eval echo $systemdsystemunitdir\`/smartd.service" 916 if test -n "$systemdenvfile"; then 917 echo "smartd environ file: \`eval eval eval echo $systemdenvfile\`" 918 else 919 echo "smartd environ file: [[disabled]]" 920 fi 921 fi 922 if test -n "$savestates"; then 923 echo "smartd save files: \`eval eval eval echo $savestates\`MODEL-SERIAL.TYPE.state" 924 else 925 echo "smartd save files: [[disabled]]" 926 fi 927 if test -n "$attributelog"; then 928 echo "smartd attribute logs: \`eval eval eval echo $attributelog\`MODEL-SERIAL.TYPE.csv" 929 else 930 echo "smartd attribute logs: [[disabled]]" 931 fi 932 case "$host_os" in 933 linux*) 934 echo "SELinux support: ${with_selinux-no}" 935 echo "libcap-ng support: $use_libcap_ng" 936 echo "systemd notify support: $use_libsystemd" ;; 937 esac 938 echo "NVMe DEVICESCAN: ${with_nvme_devicescan-[[not implemented]]}" 939 ;; 940 esac 941 echo "-----------------------------------------------------------------------------" 942` 943 944AC_MSG_NOTICE([ 945$info 946]) 947 948# TODO: Remove when NVMe support is no longer EXPERIMENTAL 949case "$os_nvme_devicescan:$with_nvme_devicescan" in 950 used:yes) AC_MSG_WARN([ 951The default for the inclusion of NVME devices in smartd.conf 952'DEVICESCAN' and 'smartctl --scan' has been changed to 'yes' on 953this platform. If '--without-nvme-devicescan' is still needed, 954please inform $PACKAGE_BUGREPORT. 955Use option '--with-nvme-devicescan' to suppress this warning. 956]) ;; 957 used:no) AC_MSG_WARN([ 958This version of smartmontools provides NVMe support which is still 959EXPERIMENTAL. NVMe devices are not yet included in smartd.conf 960'DEVICESCAN' and 'smartctl --scan' unless '-d nvme' is specified. 961Use option '--with-nvme-devicescan' to include NVMe devices. 962Use option '--without-nvme-devicescan' to suppress this warning. 963]) ;; 964esac 965 966# TODO: Remove after smartmontools 7.2 967if test -n "$with_working_snprintf"; then 968 AC_MSG_WARN([ 969The option '--with-working-snprintf' is no longer needed and will be 970removed in a future version of smartmontools. 971]) 972fi 973 974# TODO: Remove after smartmontools 7.3 975if test -n "$with_solaris_sparc_ata"; then 976 AC_MSG_WARN([ 977The option '--with-solaris-sparc-ata' is deprecated and will be 978removed in a future version of smartmontools. If this option is 979still needed, please inform $PACKAGE_BUGREPORT. 980]) 981fi 982 983case "$host_os:$with_libsystemd:$use_libsystemd:$PKG_CONFIG" in 984 linux*:auto:no:?*) 985 if $PKG_CONFIG systemd >/dev/null 2>&1; then 986 AC_MSG_WARN([ 987systemd(1) is used on this system but smartd systemd notify support will 988not be available because libsystemd-dev[[el]] package is not installed. 989Use option '--without-libsystemd' to suppress this warning. 990]) 991 fi ;; 992esac 993