diff --git a/Makefile.am b/Makefile.am
index d2bc922..d8897c8 100644
a
|
b
|
endif
|
21 | 21 | if ENABLE_ATTRIBUTELOG |
22 | 22 | AM_CPPFLAGS += -DSMARTMONTOOLS_ATTRIBUTELOG='"$(attributelog)"' |
23 | 23 | endif |
| 24 | if NEED_GETOPT_LONG |
| 25 | AM_CPPFLAGS += -I$(srcdir)/getopt -DHAVE_GETOPT_LONG |
| 26 | endif |
24 | 27 | |
25 | 28 | sbin_PROGRAMS = smartd \ |
26 | 29 | smartctl |
… |
… |
EXTRA_smartctl_SOURCES += \
|
161 | 164 | |
162 | 165 | endif |
163 | 166 | |
| 167 | if NEED_GETOPT_LONG |
| 168 | |
| 169 | smartctl_SOURCES += \ |
| 170 | getopt/getopt.c \ |
| 171 | getopt/getopt.h \ |
| 172 | getopt/getopt1.c |
| 173 | |
| 174 | smartd_SOURCES += \ |
| 175 | getopt/getopt.c \ |
| 176 | getopt/getopt.h \ |
| 177 | getopt/getopt1.c |
| 178 | |
| 179 | endif |
| 180 | |
164 | 181 | if OS_SOLARIS |
165 | 182 | # This block is required because Solaris uses manual page section 1m |
166 | 183 | # for administrative command (linux/freebsd use section 8) and Solaris |
diff --git a/configure.in b/configure.in
index a733bca..6822cb5 100644
a
|
b
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
107 | 107 | AC_CHECK_TYPES([int64_t, uint64_t]) |
108 | 108 | |
109 | 109 | dnl Checks for library functions. |
110 | | AC_CHECK_FUNCS([getopt_long], , [ |
111 | | AC_MSG_NOTICE([smartmontools does no longer support platforms without getopt_long().]) |
112 | | AC_MSG_NOTICE([Please inform ${PACKAGE_BUGREPORT},]) |
113 | | AC_MSG_NOTICE([including details about your build environment.]) |
114 | | AC_MSG_ERROR([function getopt_long() not found]) |
115 | | ]) |
| 110 | AC_CHECK_FUNCS([getopt_long], [need_getopt_long=no], [need_getopt_long=yes]) |
| 111 | AM_CONDITIONAL(NEED_GETOPT_LONG, [test "$need_getopt_long" = "yes"]) |
116 | 112 | |
117 | 113 | AC_CHECK_FUNCS([getdomainname]) |
118 | 114 | AC_CHECK_FUNCS([gethostname]) |