]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - INSTALL
Merge branch 'upstream' of git.debian.org:/git/collab-maint/smartmontools into upstream
[mirror_smartmontools-debian.git] / INSTALL
CommitLineData
832b75ed
GG
1Smartmontools installation instructions
2=======================================
3
17d0b8d9 4<<<<<<< HEAD
a86ec89e 5$Id: INSTALL 4120 2015-08-27 16:12:21Z samm2 $
17d0b8d9 6=======
3d8ad6fa 7$Id: INSTALL 4094 2015-05-27 21:41:17Z chrfranke $
17d0b8d9 8>>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
832b75ed
GG
9
10Please also see the smartmontools home page:
a86ec89e 11http://www.smartmontools.org/
832b75ed
GG
12
13Table of contents:
14
15[1] System requirements
2127e193 16[2] Installing from SVN
832b75ed
GG
17[3] Installing from source tarball
18[4] Guidelines for different Linux distributions
19[5] Guidelines for FreeBSD
20[6] Guidelines for Darwin
21[7] Guidelines for NetBSD
22[8] Guidelines for Solaris
23[9] Guidelines for Cygwin
24[10] Guidelines for Windows
25[11] Guidelines for OS/2, eComStation
26[12] Guidelines for OpenBSD
27[13] Comments
28[14] Detailed description of ./configure options
29
30[1] System requirements
31=======================
32
33 A) Linux
34
35 Any Linux distribution will support smartmontools if it has a
36 kernel version greater than or equal to 2.2.14. So any recent
37 Linux distribution should support smartmontools.
38
832b75ed
GG
39 B) FreeBSD
40
41 For FreeBSD support, a 5-current kernel that includes ATAng is
42 required in order to support ATA drives. Even current versions of
43 ATAng will not support 100% operation, as the SMART status can not
44 be reliably retrieved. There is patch pending approval of the
45 ATAng driver maintainer that will address this issue.
46
47 C) Solaris
48
49 The SCSI code has been tested on a variety of Solaris 8 and 9
50 systems. ATA/IDE code only works on SPARC platform. All tested
51 kernels worked correctly.
52
53 D) NetBSD/OpenBSD
54
55 The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should
56 also function under 1.6.1 and later releases (unverified). Currently
57 it doesn't support ATA devices on 3ware RAID controllers.
58
59 E) Cygwin
60
ee38a438 61 The code was tested on Cygwin 1.7.15-1. It should also work on other
cfbba5b9 62 recent releases.
832b75ed
GG
63
64 Both Cygwin and Windows versions of smartmontools share the same code
65 to access the IDE/ATA or SCSI devices. The information in the "Windows"
66 section below also applies to the Cygwin version.
67
68 F) Windows
69
a86ec89e
GI
70 The code was tested on Windows XP SP3, 2003, Vista, Windows 7, 8, 8.1
71 and Windows 10 Release Preview. Support von Windows 9x/ME and NT4 was
72 removed after smartmontools 5.43.
832b75ed 73
bed94269
GI
74 ATA or SATA devices are supported if the device driver implements
75 the SMART IOCTLs or IOCTL_IDE_PASS_THROUGH or IOCTL_ATA_PASS_THROUGH.
ee38a438
GI
76 Only the latter provides full pass-through support which is needed
77 for all smartmontools features.
832b75ed 78
bed94269
GI
79 SCSI and USB devices are accessed through SPTI. Special driver support
80 is not required.
4d59bff9 81
bed94269 82 3ware 9000 RAID controllers are supported using features available
ba59cff1
GG
83 in the Windows driver release 9.4.0 (3wareDrv.sys 3.0.2.70) or later.
84 Older drivers provide SMART access to the first physical drive (port)
9ebc753d
GG
85 of each logical drive (unit). If driver support is not available
86 (7000/8000 series, 9000 on XP 64), smartctl can be used to parse SMART
87 data output from CLI or 3DM.
832b75ed
GG
88
89 G) MacOS/Darwin
90
91 The code was tested on MacOS 10.3.4. It should work from 10.3
92 forwards. It doesn't support 10.2.
93
4d59bff9
GG
94 It's important to know that on 10.3.x, some things don't work
95 (see WARNINGS): due to bugs in the libraries used, you cannot run
96 a short test or switch SMART support off on a drive; if you try,
97 you will just run an extended test or switch SMART support on. So
98 don't panic when your "short" test seems to be taking hours.
832b75ed
GG
99
100 It's also not possible at present to control when the offline
101 routine runs. If your drive doesn't have it running automatically by
102 default, you can't run it at all.
103
104 SCSI devices are not currently supported. Detecting the power
105 status of a drive is also not currently supported.
106
107 To summarize this, from another point of view, the things that
108 are not supported fall into two categories:
109
110 * Can't be implemented easily without more kernel-level support,
111 so far as I know:
112 - running immediate offline, conveyance, or selective tests
113 - running any test in captive mode
114 - aborting tests
115 - switching automatic offline testing on or off
116 - support for SCSI
117 - checking the power mode [-n Directive of smartd] (this is not
118 completely impossible, but not by using a documented API)
119
4d59bff9 120 * Work on 10.4 and later, but not on 10.3:
832b75ed
GG
121 - switching off SMART (switching *on* works fine)
122 - switching off auto-save (but why would you want to?)
123 - running the short test (that leaves you with only the extended test)
124
832b75ed
GG
125 However, some things do work well. For ATA devices, all the
126 informational output is available, unless you want something that only
4d59bff9
GG
127 an offline test updates. On many newer Mac OS systems, the
128 hard drive comes with the offline test switched on by default, so
129 even that works.
832b75ed 130
f4e463df
GI
131 The OS X SAT SMART Driver provides access to SMART data for SAT capable
132 USB and Firewire devices:
133 https://github.com/kasbert/OS-X-SAT-SMART-Driver
134 https://github.com/RJVB/OS-X-SAT-SMART-Driver
135 This does not require any smartctl -d TYPE option and should work also
136 with older smartmontools releases.
137
832b75ed
GG
138 H) OS/2, eComStation
139
140 The code was tested on eComStation 1.1, but it should work on all versions
141 of OS/2.
142 Innotek LibC 0.5 runtime is required.
a86ec89e 143 Only ATA disks are supported.
832b75ed 144
2127e193 145[2] Installing from SVN
832b75ed 146=======================
2127e193
GI
147
148 Get the sources from the SVN repository:
3d17a85c 149 svn co http://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools
832b75ed
GG
150
151 Then type:
152 ./autogen.sh
153 and continue with step [3] below, skipping the "unpack the tarball" step.
154
832b75ed 155 The autogen.sh command is ONLY required when installing from
2127e193
GI
156 SVN. You need GNU Autoconf (version 2.50 or greater), GNU Automake
157 (version 1.7 or greater) and their dependencies installed in order
832b75ed 158 to run it. You can get these here:
cfbba5b9
GI
159 http://directory.fsf.org/project/autoconf/
160 http://directory.fsf.org/project/automake/
832b75ed
GG
161
162[3] Installing from the source tarball
163======================================
164
2127e193 165 If you are NOT installing from SVN, then unpack the tarball:
832b75ed
GG
166 tar zxvf smartmontools-5.VERSION.tar.gz
167
168 Then:
169 ./configure
170 make
171 make install (you may need to be root to do this)
172
173 As shown (with no options to ./configure) this defaults to the
a86ec89e
GI
174 following set of installation directories and other settings:
175
832b75ed 176 --prefix=/usr/local
a86ec89e
GI
177 --exec-prefix='${prefix}'
178 --sbindir='${exec_prefix}/sbin'
179 --sysconfdir='${prefix}/etc'
180 --localstatedir='${prefix}/var'
181 --datarootdir='${prefix}/share'
182 --datadir='${datarootdir}'
183 --mandir='${datarootdir}/man'
184 --docdir='${datarootdir}/doc/smartmontools'
832b75ed 185 --disable-sample
a86ec89e
GI
186 --with-systemdsystemunitdir=auto
187 --with-systemdenvfile=auto
188 --with-initscriptdir=auto
189 --with-exampledir='${docdir}/examplescripts'
190 --with-drivedbdir='${datadir}/smartmontools'
191 --with-smartdscriptdir='${sysconfdir}'
192 --with-smartdplugindir='${smartdscriptdir}/smartd_warning.d'
193 --without-savestates
194 --without-attributelog
195 --with-os-deps='os_linux.o dev_areca.o' (platform specific)
cfbba5b9 196 --without-selinux
a86ec89e
GI
197 --with-libcap-ng=auto
198 --with-working-snprintf
832b75ed
GG
199
200 These will usually not overwrite existing "distribution" installations on
201 Linux Systems since the FHS reserves this area for use by the system
202 administrator.
203
204 For different installation locations or distributions, simply add
205 arguments to ./configure as shown in [4] below.
206
cfbba5b9
GI
207 If you wish to alter the default C++ compiler flags, set an
208 environment variable CXXFLAGS='your options' before doing
832b75ed 209 ./configure, or else do:
cfbba5b9 210 make CXXFLAGS='your options'
832b75ed 211
2127e193
GI
212 The first output line of smartctl and smartd provides information
213 about release number, last SVN checkin date and revison, platform,
214 and package. The latter defaults to "(local build)" and can be
215 changed by the variable BUILD_INFO, for example:
216 make BUILD_INFO='"(Debian 5.39-2)"'
217
832b75ed
GG
218[4] Guidelines for different Linux distributions
219================================================
220
221Note: Please send corrections/additions to:
222smartmontools-support@lists.sourceforge.net
223
224Debian:
225 If you don't want to overwrite any distribution package, use:
226 ./configure
227
228Filesystem Hierarchy Standard (FHS, http://www.pathname.com/fhs/):
229 ./configure --sbindir=/usr/local/sbin \
230 --sysconfdir=/usr/local/etc \
231 --mandir=/usr/local/man \
d008864d
GI
232 --docdir=/usr/local/share/doc/smartmontools \
233 --with-initscriptdir=/usr/local/etc/init.d
832b75ed
GG
234
235Red Hat:
236 ./configure --sbindir=/usr/sbin \
cfbba5b9
GI
237 --sysconfdir=/etc \
238 --mandir=/usr/share/man \
d008864d
GI
239 --docdir=/usr/share/doc/smartmontools \
240 --with-initscriptdir=/etc/rc.d/init.d
832b75ed
GG
241
242Slackware:
243 If you don't want to overwrite any "distribution" package, use:
244 ./configure
245
246 Otherwise use:
247 ./configure --sbindir=/usr/sbin \
248 --sysconfdir=/etc \
249 --mandir=/usr/share/man \
d008864d
GI
250 --docdir=/usr/share/doc/smartmontools \
251 --with-initscriptdir=/etc/rc.d
832b75ed
GG
252
253 And
254 removepkg smartmontools smartsuite (only root can do this)
255 before make install
256
257 The init script works on Slackware. You just have to add an entry like
258 the following in /etc/rc.d/rc.M or /etc/rc.d/rc.local:
259
260 if [ -x /etc/rc.d/smartd ]; then
261 . /etc/rc.d/smartd start
262 fi
263
264 To disable it:
265 chmod 644 /etc/rc.d/smartd
266
267 For a list of options:
268 /etc/rc.d/smartd
269
270SuSE:
271 ./configure --sbindir=/usr/sbin \
272 --sysconfdir=/etc \
273 --mandir=/usr/share/man \
d008864d 274 --docdir=/usr/share/doc/packages/smartmontools-VERSION \
832b75ed 275 --with-initscriptdir=/etc/init.d \
832b75ed
GG
276
277[5] Guidelines for FreeBSD
278==========================
279 To match the way it will installed when it becomes available as a PORT, use
280 the following:
281
282 ./configure --prefix=/usr/local \
d008864d 283 --docdir=/usr/local/share/doc/smartmontools-VERSION \
832b75ed 284 --with-initscriptdir=/usr/local/etc/rc.d/ \
cfbba5b9 285 --enable-sample
832b75ed 286
832b75ed
GG
287 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
288 be installed with the string '.sample' append to the name, so you will end
289 up with the following:
cfbba5b9
GI
290 /usr/local/etc/smartd.conf.sample
291 /usr/local/etc/rc.d/smartd.sample
832b75ed
GG
292
293
294[6] Guidelines for Darwin
295=========================
296 ./configure --with-initscriptdir=/Library/StartupItems
297
4d59bff9
GG
298 If you'd like to build the i386 version on a powerpc machine, you can
299 use
300
a37e7145 301 CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
4d59bff9 302 ./configure --host=i386-apple-darwin \
cfbba5b9 303 --with-initscriptdir=/Library/StartupItems
832b75ed 304
d008864d
GI
305[7] Guidelines for NetBSD
306=========================
832b75ed 307 ./configure --prefix=/usr/pkg \
d008864d 308 --docdir=/usr/pkg/share/doc/smartmontools
832b75ed
GG
309
310[8] Guidelines for Solaris
311==========================
312
313 smartmontools has been partially but not completely ported to
314 Solaris. It includes complete SCSI support but no ATA or 3ware
2127e193
GI
315 support. It can be compiled with either CC (Sun's C++ compiler)
316 or GNU g++.
317
318 To compile with g++:
832b75ed
GG
319
320 ./configure [args]
321 make
322
2127e193 323 To compile with Sun CC:
832b75ed 324
2127e193 325 env CC=cc CXX=CC ./configure [args]
832b75ed
GG
326 make
327
328 The correct arguments [args] to configure are:
329 --sbindir=/usr/sbin \
330 --sysconfdir=/etc \
331 --mandir=/usr/share/man \
d008864d 332 --docdir=/usr/share/doc/smartmontools-VERSION \
832b75ed
GG
333 --with-initscriptdir=/etc/init.d
334
335 To start the script automatically on bootup, create hardlinks that
336 indicate when to start/stop in:
cfbba5b9 337 /etc/rc[S0123].d/
832b75ed 338 pointing to /etc/init.d/smartd. Create:
cfbba5b9
GI
339 K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d
340 S<snum>smartd in rc3.d
832b75ed
GG
341 where <knum> is related to <snum> such that the higher snum is the
342 lower knum must be.
343
344 On usual configuration, '95' would be suitable for <snum> and '05'
345 for <knum> respectively. If you choose these value, you can
346 create hardlinks by:
347
348 cd /etc
349 sh -c 'for n in S 0 1 2; do ln init.d/smartd rc$n.d/K05smartd; done'
350 sh -c 'for n in 3 ; do ln init.d/smartd rc$n.d/S95smartd; done'
351
352[9] Guidelines for Cygwin
353=========================
354
355Same as Red Hat:
356 ./configure --prefix=/usr \
357 --sysconfdir=/etc \
358 --mandir='${prefix}/share/man'
359
360 OR EQUIVALENTLY
361 ./configure --sbindir=/usr/sbin \
362 --sysconfdir=/etc \
363 --mandir=/usr/share/man \
d008864d
GI
364 --docdir=/usr/share/doc/smartmontools \
365 --with-initscriptdir=/etc/rc.d/init.d
832b75ed
GG
366
367 Using DOS text file type as default for the working directories ("textmode"
368 mount option) is not recommended. Building the binaries and man pages using
369 "make" is possible, but "make dist" and related targets work only with UNIX
370 file type ("binmode" mount option) set. The "autogen.sh" script prints a
371 warning if DOS type is selected.
372
e165493d
GI
373 Files may also be checked out with a non-Cygwin SVN client which uses CR/LF
374 for svn:eol-style=native. The "autogen.sh" script has svn:eol-style=LF.
375 Bash option "-o igncr" is not required.
ba59cff1 376
832b75ed 377[10] Guidelines for Windows
eb07ddf2 378===========================
832b75ed 379
eb07ddf2 380To compile the Windows release with MinGW gcc on MSYS, use:
832b75ed 381
eb07ddf2 382 ./configure
832b75ed
GG
383 make
384
385 Instead of using "make install", copy the .exe files into
386 some directory in the PATH.
387
a86ec89e 388Cross-compile statically linked 32-bit and 64-bit versions with MinGW-w64:
eb07ddf2 389
7f0798ef 390 ./configure --build=$(./config.guess) \
cfbba5b9
GI
391 --host=i686-w64-mingw32 \
392 LDFLAGS=-static
eb07ddf2 393
cfbba5b9
GI
394 ./configure --build=$(./config.guess) \
395 --host=x86_64-w64-mingw32 \
7f0798ef
GI
396 LDFLAGS=-static
397
a86ec89e 398 Tested on Cygwin, Debian and Fedora.
eb07ddf2
GI
399
400
832b75ed
GG
401To build the Windows binary distribution, use:
402
403 make dist-win32
4d59bff9 404
832b75ed
GG
405 This builds the distribution in directory
406
407 ./smartmontools-VERSION.win32/
408
409 and packs it into
410
411 ./smartmontools-VERSION.win32.zip
412
4d59bff9
GG
413To create a Windows installer, use:
414
415 make installer-win32
416
417 This builds the distribution directory and packs it into the
418 self-extracting install program
419
420 ./smartmontools-VERSION.win32-setup.exe
421
422 The installer is build using the command "makensis" from the NSIS
423 package. See http://nsis.sourceforge.net/ for documentation and
2127e193 424 download location.
4d59bff9 425
7f0798ef 426 It is also possible to (cross-)build the installer on Linux.
a86ec89e
GI
427 This was successfully tested on Debian and Fedora with package
428 "nsis".
7f0798ef 429
f4e463df
GI
430To create a combined 32-/64-bit installer, use this in 32-bit build
431directory if 64-build directory is at ../build64:
432
433 make builddir_win64=../build64 installer_win32
434
4d59bff9
GG
435To both create and run the (interactive) installer, use:
436
437 make install-win32
438
832b75ed
GG
439 Additional make targets are distdir-win32 to build the directory
440 only and cleandist-win32 for cleanup.
441
442 The binary distribution includes all documentation files converted
443 to DOS text file format and *.html and *.txt preformatted man pages.
cfbba5b9 444
d008864d
GI
445To prepare os_win32 directory for MS Visual Studio C++ 2010 [Express],
446use the following on MSYS or Cygwin:
2127e193
GI
447
448 mkdir vctmp && cd vctmp
cfbba5b9 449 ../configure [... any MinGW option set from above ...]
d008864d 450 make config-vc10
832b75ed 451
ee38a438
GI
452 The MSVC project files (os_win32/vc10/*) are included in SVN (but not
453 in source tarball). The target config-vc10 from a Makefile configured
a86ec89e
GI
454 for MinGW creates os_win32/vc10/{config.h,smart*.rc,svnversion.h}.
455 The configure skript must be run outside of the source directory to
456 avoid inclusion of the original config.h.
832b75ed 457
832b75ed
GG
458
459[11] Guidelines for OS/2, eComStation
460=====================================
461
462To compile the OS/2 code, please run
463
464 ./os_os2/configure.os2
465 make
466 make install
467
468[12] Guidelines for OpenBSD
d008864d 469===========================
832b75ed
GG
470 To match the way it will installed when it becomes available as a PORT, use
471 the following:
472
473 ./configure --prefix=/usr/local \
d008864d
GI
474 --sysconfdir=/etc \
475 --docdir=/usr/local/share/doc/smartmontools-VERSION \
476 --without-initscriptdir \
cfbba5b9 477 --enable-sample
832b75ed 478
d008864d 479 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
832b75ed
GG
480 be installed with the string '.sample' append to the name, so you will end
481 up with the following:
d008864d 482 /etc/smartd.conf.sample
832b75ed
GG
483
484[13] Comments
485============
486
487To compile from another directory, you can replace the step
488 ./configure [options]
489by the following:
490 mkdir objdir
491 cd objdir
492 ../configure [options]
493
d008864d
GI
494Man pages contents is platform-specific by default. Info specific to other
495platforms may be not visible. To generate man pages with full contents use:
496
497 make os_man_filter=
498
832b75ed
GG
499To install to another destination (used mainly by package maintainers,
500or to examine the package contents without risk of modifying any
501system files) you can replace the step:
502 make install
503with:
504 make DESTDIR=/home/myself/smartmontools-package install
505
d008864d 506Use a full path. Paths like ./smartmontools-package may not work.
832b75ed
GG
507
508After installing smartmontools, you can read the man pages, and try
509out the commands:
510
511man smartd.conf
512man smartctl
513man smartd
514
a86ec89e
GI
515/usr/sbin/smartctl -s on -o on -S on /dev/sda (only root can do this)
516/usr/sbin/smartctl -a /dev/sda (only root can do this)
832b75ed
GG
517
518Note that the default location for the manual pages are
519/usr/share/man/man5 and /usr/share/man/man8. If "man" doesn't find
520them, you may need to add /usr/share/man to your MANPATH environment
521variable.
522
cfbba5b9
GI
523Source and binary packages for Windows are available at
524http://sourceforge.net/projects/smartmontools/files/
832b75ed 525
d2e702cf
GI
526Refer to http://www.smartmontools.org/wiki/Download for any additional
527download and installation instructions.
832b75ed
GG
528
529The following files are installed if ./configure has no options:
530
832b75ed 531/usr/local/sbin/smartctl [Executable command-line utility]
cfbba5b9
GI
532/usr/local/sbin/smartd [Executable daemon]
533/usr/local/sbin/update-smart-drivedb [Drive database update script]
832b75ed 534/usr/local/etc/smartd.conf [Configuration file for smartd daemon]
a86ec89e 535/usr/local/etc/smartd_warning.sh [Warning skript for smartd daemon]
832b75ed
GG
536/usr/local/share/man/man5/smartd.conf.5 [Manual page]
537/usr/local/share/man/man8/smartctl.8 [Manual page]
538/usr/local/share/man/man8/smartd.8 [Manual page]
a86ec89e 539/usr/local/share/man/man8/update-smart-drivedb.8 [Manual page]
cfbba5b9 540/usr/local/share/doc/smartmontools/AUTHORS [Information about the authors and developers]
ee38a438 541/usr/local/share/doc/smartmontools/ChangeLog [A log of changes. Also see SVN]
cfbba5b9
GI
542/usr/local/share/doc/smartmontools/COPYING [GNU General Public License Version 2]
543/usr/local/share/doc/smartmontools/INSTALL [Installation instructions: what you're reading!]
a86ec89e 544/usr/local/share/doc/smartmontools/NEWS [Significant enhancements and fixes]
cfbba5b9
GI
545/usr/local/share/doc/smartmontools/README [Overview]
546/usr/local/share/doc/smartmontools/TODO [Things that need to be done/fixed]
cfbba5b9
GI
547/usr/local/share/doc/smartmontools/smartd.conf [Example configuration file for smartd]
548/usr/local/share/doc/smartmontools/examplescripts/ [Executable scripts for -M exec of smartd.conf (4 files)]
549/usr/local/share/smartmontools/drivedb.h [Drive database]
550
a86ec89e
GI
551Due to checks done by '--with-systemdsystemunitdir=auto' and '--with-initscriptdir=auto',
552one of the following files may also be installed:
553
554/usr/local/lib/systemd/system/smartd.service [Systemd service file for smartd]
555/usr/local/etc/rc.d/init.d/smartd [Init/Startup script for smartd]
556/usr/local/etc/init.d/smartd [Init/Startup script for smartd]
557/usr/local/etc/rc.d/smartd [Init/Startup script for smartd]
558
cfbba5b9
GI
559If /usr/local/etc/smartd.conf exists and differs from the
560default then the default configuration file is installed as
561/usr/local/etc/smartd.conf.sample instead.
832b75ed
GG
562
563The commands:
564
565make htmlman
566make txtman
567
568may be used to build .html and .txt preformatted man pages.
569These are used by the dist-win32 make target to build the Windows
570distribution.
571The commands also work on other operating system configurations
572if suitable versions of man2html, groff and grotty are installed.
573On systems without man2html, the following command should work
574if groff is available:
575
576make MAN2HTML='groff -man -Thtml' htmlman
577
578
2127e193
GI
579Some of the source files are prepared for the documentation
580generator Doxygen (http://www.doxygen.org/). If Doxygen is installed,
581the command:
582
583doxygen
584
585creates HTML documentation in doc/html and LaTeX documentation
586in doc/latex. If TeX is installed, the following command creates
587a documentation file doc/latex/refman.pdf:
588
589( cd doc/latex && make pdf )
590
591
832b75ed
GG
592[14] Detailed description of arguments to configure command
593===========================================================
594
595When you type:
a86ec89e
GI
596./configure --help
597a description of available configure options is printed
598[with defaults in square brackets]. See also section [3] above.
599
600
601The following old configure options are deprecated and will be removed
602in a future release of smartmontools:
603
604Old option Replacement
605--with-docdir=DIR --docdir=DIR (autoconf >= 2.60)
606--enable-drivedb [no option needed]
607--disable-drivedb --without-drivedbdir
608--enable-savestates --with-savestates[=yes]
609--disable-savestates [no option needed]
610--enable-attrbutelog --with-attributelog[=yes]
611--disable-savestates [no option needed]
612
a23d5117 613
a7e8ffec
GI
614The defaults for --with-initscriptdir and --with-systemdsystemunitdir are
615guessed such that the following rules apply:
616- If --prefix=/usr --sysconfdir=/etc is specified, the guessed directories
617 should be the defaults used by the current OS or distribution.
618- If --sysconfdir=/etc is NOT specified, the guessed directories should
619 always be below ${prefix} or below ${sysconfdir}.
620
832b75ed
GG
621Here's an example:
622If you set --prefix=/home/joe and none of the other four
623variables then the different directories that are used would be:
624--sbindir /home/joe/sbin
a7e8ffec 625--docdir /home/joe/share/doc/smartmontools
832b75ed
GG
626--mandir /home/joe/share/man
627--sysconfdir /home/joe/etc
a7e8ffec
GI
628--with-exampledir /home/joe/share/doc/smartmontools/examplescripts
629--with-drivedbdir /home/joe/share/smartmontools
630--with-initscriptdir [see below]
631--with-systemdsystemunitdir [see below]
632
633If systemd is present (and pkg-config reports /lib/systemd/system
634as the systemdsystemunitdir):
635
636--with-initscriptdir [disabled]
637--with-systemdsystemunitdir /home/joe/lib/systemd/system
638
639else if /etc/rc.d/init.d exists:
640
641--with-initscriptdir /home/joe/etc/rc.d/init.d
642--with-systemdsystemunitdir [disabled]
643
644else if /etc/init.d exists:
645
646--with-initscriptdir /home/joe/etc/init.d
647--with-systemdsystemunitdir [disabled]
648
649else if /etc/rc.d exists:
650
651--with-initscriptdir /home/joe/etc/rc.d
652--with-systemdsystemunitdir [disabled]
653
654else
655
656--with-initscriptdir [disabled]
657--with-systemdsystemunitdir [disabled]
832b75ed 658
832b75ed
GG
659
660Here are the differences with and without --enable-sample, assuming
a7e8ffec
GI
661that initscript location is set and no other options specified
662(see above for details)
832b75ed
GG
663
664Case 1:
665--enable-sample provided
666==> Files installed are:
cfbba5b9
GI
667 /usr/local/etc/smartd.conf.sample
668 /usr/local/etc/rc.d/init.d/smartd.sample
832b75ed
GG
669
670Case 2:
671--disable-sample provided or parameter left out
672==> Files installed are:
cfbba5b9
GI
673 /usr/local/etc/smartd.conf
674 /usr/local/etc/rc.d/init.d/smartd
832b75ed
GG
675
676Additional information about using configure can be found here:
cfbba5b9 677http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts