| 1 | dnl -*- mode: m4; -*- |
|---|
| 2 | |
|---|
| 3 | AC_PREREQ(2.60) |
|---|
| 4 | |
|---|
| 5 | define([PACKAGE_VERSION_MAJOR], [0]) |
|---|
| 6 | define([PACKAGE_VERSION_MINOR], [6]) |
|---|
| 7 | define([PACKAGE_VERSION_FIX], [15]) |
|---|
| 8 | |
|---|
| 9 | AC_INIT([openct],[PACKAGE_VERSION_MAJOR.PACKAGE_VERSION_MINOR.PACKAGE_VERSION_FIX-svn]) |
|---|
| 10 | AC_CONFIG_AUX_DIR([.]) |
|---|
| 11 | AC_CONFIG_HEADERS([config.h]) |
|---|
| 12 | AC_CONFIG_MACRO_DIR([m4]) |
|---|
| 13 | AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}]) |
|---|
| 14 | |
|---|
| 15 | OPENCT_VERSION_MAJOR="PACKAGE_VERSION_MAJOR" |
|---|
| 16 | OPENCT_VERSION_MINOR="PACKAGE_VERSION_MINOR" |
|---|
| 17 | OPENCT_VERSION_FIX="PACKAGE_VERSION_FIX" |
|---|
| 18 | |
|---|
| 19 | # LT Version numbers, remember to change them just *before* a release. |
|---|
| 20 | # (Code changed: REVISION++) |
|---|
| 21 | # (Oldest interface removed: OLDEST++) |
|---|
| 22 | # (Interfaces added: CURRENT++, REVISION=0) |
|---|
| 23 | OPENCT_LT_CURRENT="1" |
|---|
| 24 | OPENCT_LT_OLDEST="1" |
|---|
| 25 | OPENCT_LT_REVISION="0" |
|---|
| 26 | OPENCT_LT_AGE="$((${OPENCT_LT_CURRENT}-${OPENCT_LT_OLDEST}))" |
|---|
| 27 | |
|---|
| 28 | AC_CONFIG_SRCDIR(src/ifd/ifdhandler.c) |
|---|
| 29 | |
|---|
| 30 | AC_CANONICAL_HOST |
|---|
| 31 | |
|---|
| 32 | # ct_socket_getcreds::SO_PEERCRED |
|---|
| 33 | AC_GNU_SOURCE |
|---|
| 34 | |
|---|
| 35 | AC_PROG_CC |
|---|
| 36 | PKG_PROG_PKG_CONFIG |
|---|
| 37 | AC_C_BIGENDIAN |
|---|
| 38 | |
|---|
| 39 | AC_MSG_CHECKING([svn checkout]) |
|---|
| 40 | if test -e "${srcdir}/packaged"; then |
|---|
| 41 | svn_checkout="no" |
|---|
| 42 | else |
|---|
| 43 | svn_checkout="yes" |
|---|
| 44 | fi |
|---|
| 45 | AC_MSG_RESULT([${svn_checkout}]) |
|---|
| 46 | |
|---|
| 47 | dnl Check for some target-specific stuff |
|---|
| 48 | case "${host}" in |
|---|
| 49 | *-*-hpux*) |
|---|
| 50 | CPPFLAGS="${CPPFLAGS} -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED" |
|---|
| 51 | ;; |
|---|
| 52 | *-*-solaris*) |
|---|
| 53 | CPPFLAGS="${CPPFLAGS} -I/usr/local/include" |
|---|
| 54 | LDFLAGS="${LDFLAGS} -L/usr/local/lib -R/usr/local/lib" |
|---|
| 55 | need_dash_r="1" |
|---|
| 56 | ;; |
|---|
| 57 | *-*-sunos4*) |
|---|
| 58 | CPPFLAGS="${CPPFLAGS} -DSUNOS4" |
|---|
| 59 | ;; |
|---|
| 60 | *-*-aix*) |
|---|
| 61 | CPPFLAGS="${CPPFLAGS} -I/usr/local/include" |
|---|
| 62 | LDFLAGS="${LDFLAGS} -L/usr/local/lib" |
|---|
| 63 | if test "${LD}" != "gcc" -a -z "${blibpath}"; then |
|---|
| 64 | blibpath="/usr/lib:/lib:/usr/local/lib" |
|---|
| 65 | fi |
|---|
| 66 | ;; |
|---|
| 67 | *-*-osf*) |
|---|
| 68 | CPPFLAGS="${CPPFLAGS} -D_POSIX_PII_SOCKET" |
|---|
| 69 | ;; |
|---|
| 70 | *-*-darwin*) |
|---|
| 71 | LIBS="${LIBS} -Wl,-framework,CoreFoundation" |
|---|
| 72 | if test "${GCC}" = "yes"; then |
|---|
| 73 | CFLAGS="${CFLAGS} -no-cpp-precomp" |
|---|
| 74 | fi |
|---|
| 75 | ;; |
|---|
| 76 | esac |
|---|
| 77 | |
|---|
| 78 | usrlibdir="/usr/lib${libdir##*/lib}" |
|---|
| 79 | usrsbindir="/usr/sbin${libdir##*/sbin}" |
|---|
| 80 | |
|---|
| 81 | full_sysconfdir=`eval eval eval eval eval echo "${sysconfdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` |
|---|
| 82 | full_localstatedir=`eval eval eval eval eval echo "${localstatedir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` |
|---|
| 83 | |
|---|
| 84 | AC_ARG_ENABLE( |
|---|
| 85 | [strict], |
|---|
| 86 | [AS_HELP_STRING([--enable-strict],[enable strict compile mode @<:@disabled@:>@])], |
|---|
| 87 | , |
|---|
| 88 | [enable_strict="no"] |
|---|
| 89 | ) |
|---|
| 90 | |
|---|
| 91 | AC_ARG_ENABLE( |
|---|
| 92 | [pedantic], |
|---|
| 93 | [AS_HELP_STRING([--enable-pedantic],[enable pedantic compile mode @<:@disabled@:>@])], |
|---|
| 94 | , |
|---|
| 95 | [enable_pedantic="no"] |
|---|
| 96 | ) |
|---|
| 97 | |
|---|
| 98 | AC_ARG_ENABLE( |
|---|
| 99 | [doc], |
|---|
| 100 | [AS_HELP_STRING([--enable-doc],[enable installation of documents @<:@disabled@:>@])], |
|---|
| 101 | , |
|---|
| 102 | [enable_doc="no"] |
|---|
| 103 | ) |
|---|
| 104 | |
|---|
| 105 | AC_ARG_ENABLE( |
|---|
| 106 | [api-doc], |
|---|
| 107 | [AS_HELP_STRING([--enable-api-doc],[enable generation and installation of api documents @<:@disabled@:>@])], |
|---|
| 108 | , |
|---|
| 109 | [enable_api_doc="no"] |
|---|
| 110 | ) |
|---|
| 111 | |
|---|
| 112 | AC_ARG_ENABLE( |
|---|
| 113 | [pcsc], |
|---|
| 114 | [AS_HELP_STRING([--enable-pcsc],[enable pcsc support @<:@disabled@:>@])], |
|---|
| 115 | , |
|---|
| 116 | [enable_pcsc="no"] |
|---|
| 117 | ) |
|---|
| 118 | |
|---|
| 119 | AC_ARG_ENABLE( |
|---|
| 120 | [usb], |
|---|
| 121 | [AS_HELP_STRING([--enable-usb],[enable usb support @<:@disabled@:>@])], |
|---|
| 122 | , |
|---|
| 123 | [enable_usb="no"] |
|---|
| 124 | ) |
|---|
| 125 | |
|---|
| 126 | AC_ARG_ENABLE( |
|---|
| 127 | [debug], |
|---|
| 128 | [AS_HELP_STRING([--enable-debug],[enable debug messages @<:@disabled@:>@])], |
|---|
| 129 | [test "${enableval}" = "yes" && AC_DEFINE([DEBUG], [1], [Enable debug messages.])] |
|---|
| 130 | ) |
|---|
| 131 | |
|---|
| 132 | AC_ARG_ENABLE( |
|---|
| 133 | [sunray], |
|---|
| 134 | [AS_HELP_STRING([--enable-sunray],[enable sunray support @<:@disabled@:>@])], |
|---|
| 135 | [test "${enableval}" = "yes" && AC_DEFINE([sunray], [1], [Enable sunray support.])] |
|---|
| 136 | ) |
|---|
| 137 | |
|---|
| 138 | AC_ARG_ENABLE( |
|---|
| 139 | [sunrayclient], |
|---|
| 140 | [AS_HELP_STRING([--enable-sunrayclient],[enable sunray client support @<:@disabled@:>@])], |
|---|
| 141 | [test "${enableval}" = "yes" && AC_DEFINE(sunrayclient, 1, [Enable sunray client support.])] |
|---|
| 142 | ) |
|---|
| 143 | |
|---|
| 144 | AC_ARG_ENABLE( |
|---|
| 145 | [non-privileged], |
|---|
| 146 | [AS_HELP_STRING([--enable-non-privileged],[enable non privileged mode @<:@disabled@:>@])], |
|---|
| 147 | [test "${enableval}" = "no" && ENABLE_NON_PRIVILEGED="#"], |
|---|
| 148 | [ENABLE_NON_PRIVILEGED="#"] |
|---|
| 149 | ) |
|---|
| 150 | |
|---|
| 151 | AC_ARG_WITH( |
|---|
| 152 | [bundle], |
|---|
| 153 | [AS_HELP_STRING([--with-bundle=PATH],[install bundle file for pcsc-lite to PATH @<:@not installed@:>@])], |
|---|
| 154 | [ |
|---|
| 155 | if test "${withval}" = "yes"; then |
|---|
| 156 | bundledir="\$(libdir)" |
|---|
| 157 | else |
|---|
| 158 | bundledir="${withval}" |
|---|
| 159 | fi |
|---|
| 160 | ], |
|---|
| 161 | [bundledir=""] |
|---|
| 162 | ) |
|---|
| 163 | |
|---|
| 164 | AC_ARG_WITH( |
|---|
| 165 | [udev], |
|---|
| 166 | [AS_HELP_STRING([--with-udev=PATH],[install udev files into PATH @<:@not installed@:>@])], |
|---|
| 167 | [ |
|---|
| 168 | if test "${withval}" = "yes"; then |
|---|
| 169 | udevdir="\$(libdir)/udev" |
|---|
| 170 | else |
|---|
| 171 | udevdir="${withval}" |
|---|
| 172 | fi |
|---|
| 173 | ], |
|---|
| 174 | [udevdir=""] |
|---|
| 175 | ) |
|---|
| 176 | |
|---|
| 177 | AC_ARG_WITH( |
|---|
| 178 | [hotplug], |
|---|
| 179 | [AS_HELP_STRING([--with-hotplug=PATH],[install hotplug files into PATH @<:@not installed@:>@])], |
|---|
| 180 | [ |
|---|
| 181 | if test "${withval}" = "yes"; then |
|---|
| 182 | hotplugdir="\$(sysconfdir)/hotplug/usb" |
|---|
| 183 | else |
|---|
| 184 | hotplugdir="${withval}" |
|---|
| 185 | fi |
|---|
| 186 | ], |
|---|
| 187 | [hotplugdir=""] |
|---|
| 188 | ) |
|---|
| 189 | |
|---|
| 190 | AC_ARG_WITH( |
|---|
| 191 | [ifddir], |
|---|
| 192 | [AS_HELP_STRING([--with-ifddir],[ifd directory @<:@/usr/lib/ifd@:>@])], |
|---|
| 193 | [ifddir="${withval}"], |
|---|
| 194 | [ifddir="${usrlibdir}/ifd"] |
|---|
| 195 | ) |
|---|
| 196 | |
|---|
| 197 | AC_ARG_WITH( |
|---|
| 198 | [apidocdir], |
|---|
| 199 | [AS_HELP_STRING([--with-apidocdir],[put API documents at this directory @<:@HTMLDIR/api@:>@])], |
|---|
| 200 | [apidocdir="${with_apidocdir}"], |
|---|
| 201 | [apidocdir="\$(htmldir)/api"] |
|---|
| 202 | ) |
|---|
| 203 | |
|---|
| 204 | AC_ARG_WITH( |
|---|
| 205 | [daemon-user], |
|---|
| 206 | [AS_HELP_STRING([--with-daemon-user=USER],[use this user for daemon @<:@openctd@:>@])], |
|---|
| 207 | [daemon_user="${withval}"], |
|---|
| 208 | [daemon_user="openctd"] |
|---|
| 209 | ) |
|---|
| 210 | |
|---|
| 211 | AC_ARG_WITH( |
|---|
| 212 | [daemon-groups], |
|---|
| 213 | [AS_HELP_STRING([--with-daemon-groups=GROUPS],[use these comma separated group list for daemon @<:@usb@:>@])], |
|---|
| 214 | [daemon_groups="${withval}"], |
|---|
| 215 | [daemon_groups="usb"] |
|---|
| 216 | ) |
|---|
| 217 | |
|---|
| 218 | dnl Checks for programs. |
|---|
| 219 | AC_PROG_CPP |
|---|
| 220 | AC_PROG_INSTALL |
|---|
| 221 | AC_PROG_LN_S |
|---|
| 222 | AC_PROG_MKDIR_P |
|---|
| 223 | AC_PROG_SED |
|---|
| 224 | AC_PROG_MAKE_SET |
|---|
| 225 | |
|---|
| 226 | AM_PROG_CC_C_O |
|---|
| 227 | |
|---|
| 228 | dnl Add libtool support. |
|---|
| 229 | ifdef( |
|---|
| 230 | [LT_INIT], |
|---|
| 231 | [ |
|---|
| 232 | LT_INIT |
|---|
| 233 | ], |
|---|
| 234 | [ |
|---|
| 235 | AC_PROG_LIBTOOL |
|---|
| 236 | ] |
|---|
| 237 | ) |
|---|
| 238 | |
|---|
| 239 | AC_CHECK_PROGS([DOXYGEN],[doxygen]) |
|---|
| 240 | test "${enable_api_doc}" = "yes" -a -z "${DOXYGEN}" && AC_MSG_ERROR([doxygen is required for api doc]) |
|---|
| 241 | |
|---|
| 242 | dnl These required for svn checkout |
|---|
| 243 | AC_ARG_VAR([XSLTPROC], [xsltproc utility]) |
|---|
| 244 | AC_ARG_VAR([SVN], [subversion utility]) |
|---|
| 245 | AC_ARG_VAR([WGET], [wget utility]) |
|---|
| 246 | AC_ARG_VAR([WGET_OPTS], [wget options]) |
|---|
| 247 | AC_ARG_VAR([TR], [tr utility]) |
|---|
| 248 | AC_CHECK_PROGS([XSLTPROC],[xsltproc]) |
|---|
| 249 | AC_CHECK_PROGS([SVN],[svn]) |
|---|
| 250 | AC_CHECK_PROGS([WGET],[wget]) |
|---|
| 251 | AC_CHECK_PROGS([TR],[tr]) |
|---|
| 252 | test -z "${WGET_OPTS}" && WGET_OPTS="-nv" |
|---|
| 253 | |
|---|
| 254 | dnl svn checkout dependencies |
|---|
| 255 | if test "${svn_checkout}" = "yes"; then |
|---|
| 256 | AC_MSG_CHECKING([XSLTPROC requirement]) |
|---|
| 257 | if test -n "${XSLTPROC}"; then |
|---|
| 258 | AC_MSG_RESULT([ok]) |
|---|
| 259 | else |
|---|
| 260 | if test "${enable_doc}" = "yes"; then |
|---|
| 261 | AC_MSG_ERROR([Missing XSLTPROC svn build with doc]) |
|---|
| 262 | else |
|---|
| 263 | AC_MSG_WARN(["make dist" will not work]) |
|---|
| 264 | fi |
|---|
| 265 | fi |
|---|
| 266 | |
|---|
| 267 | AC_MSG_CHECKING([svn doc build dependencies]) |
|---|
| 268 | if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then |
|---|
| 269 | AC_MSG_RESULT([ok]) |
|---|
| 270 | else |
|---|
| 271 | if test "${enable_doc}" = "yes"; then |
|---|
| 272 | AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build]) |
|---|
| 273 | else |
|---|
| 274 | AC_MSG_WARN(["make dist" will not work]) |
|---|
| 275 | fi |
|---|
| 276 | fi |
|---|
| 277 | fi |
|---|
| 278 | |
|---|
| 279 | dnl Checks for header files. |
|---|
| 280 | AC_HEADER_STDC |
|---|
| 281 | AC_HEADER_SYS_WAIT |
|---|
| 282 | AC_CHECK_HEADERS([ \ |
|---|
| 283 | errno.h fcntl.h malloc.h stdlib.h string.h \ |
|---|
| 284 | strings.h sys/time.h unistd.h getopt.h \ |
|---|
| 285 | dlfcn.h sys/poll.h |
|---|
| 286 | ]) |
|---|
| 287 | |
|---|
| 288 | dnl Checks for typedefs, structures, and compiler characteristics. |
|---|
| 289 | AC_C_CONST |
|---|
| 290 | AC_TYPE_UID_T |
|---|
| 291 | AC_TYPE_SIZE_T |
|---|
| 292 | AC_HEADER_TIME |
|---|
| 293 | |
|---|
| 294 | dnl Checks for library functions. |
|---|
| 295 | AC_FUNC_ERROR_AT_LINE |
|---|
| 296 | AC_FUNC_STAT |
|---|
| 297 | AC_FUNC_VPRINTF |
|---|
| 298 | AC_CHECK_FUNCS([gettimeofday daemon]) |
|---|
| 299 | |
|---|
| 300 | dnl C Compiler features |
|---|
| 301 | AC_C_INLINE |
|---|
| 302 | |
|---|
| 303 | dnl See if socket() is found from libsocket |
|---|
| 304 | AC_CHECK_LIB( |
|---|
| 305 | [socket], |
|---|
| 306 | [socket], |
|---|
| 307 | [ |
|---|
| 308 | LIBS="${LIBS} -lsocket" |
|---|
| 309 | AC_CHECK_LIB( |
|---|
| 310 | [resolv], |
|---|
| 311 | [res_query], |
|---|
| 312 | [LIBS="${LIBS} -lresolv"] |
|---|
| 313 | ) |
|---|
| 314 | ] |
|---|
| 315 | ) |
|---|
| 316 | |
|---|
| 317 | AC_ARG_VAR([LTLIB_CFLAGS], [C compiler flags for libltdl]) |
|---|
| 318 | AC_ARG_VAR([LTLIB_LIBS], [linker flags for libltdl]) |
|---|
| 319 | if test -z "${LTLIB_LIBS}"; then |
|---|
| 320 | AC_CHECK_LIB( |
|---|
| 321 | [ltdl], |
|---|
| 322 | [lt_dlopen], |
|---|
| 323 | [LTLIB_LIBS="-lltdl"], |
|---|
| 324 | [AC_MSG_ERROR([ltdl not found, please install libltdl and/or libtool])] |
|---|
| 325 | ) |
|---|
| 326 | fi |
|---|
| 327 | saved_CFLAGS="${CFLAGS}" |
|---|
| 328 | CFLAGS="${CFLAGS} ${LTLIB_CFLAGS}" |
|---|
| 329 | AC_CHECK_HEADER( |
|---|
| 330 | [ltdl.h], |
|---|
| 331 | , |
|---|
| 332 | [AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool])] |
|---|
| 333 | ) |
|---|
| 334 | CFLAGS="${saved_CFLAGS}" |
|---|
| 335 | |
|---|
| 336 | AC_MSG_CHECKING([struct sockaddr_storage::ss_family]) |
|---|
| 337 | AC_COMPILE_IFELSE( |
|---|
| 338 | [AC_LANG_PROGRAM( |
|---|
| 339 | [[ |
|---|
| 340 | #include <sys/types.h> |
|---|
| 341 | #include <sys/socket.h> |
|---|
| 342 | ]], |
|---|
| 343 | [[ |
|---|
| 344 | struct sockaddr_storage s; |
|---|
| 345 | s.ss_family = 1; |
|---|
| 346 | ]] |
|---|
| 347 | )], |
|---|
| 348 | [AC_MSG_RESULT([ok])], |
|---|
| 349 | [AC_TRY_COMPILE( |
|---|
| 350 | [ |
|---|
| 351 | #include <sys/types.h> |
|---|
| 352 | #include <sys/socket.h> |
|---|
| 353 | ], |
|---|
| 354 | [ |
|---|
| 355 | struct sockaddr_storage s; |
|---|
| 356 | s.__ss_family = 1; |
|---|
| 357 | ], |
|---|
| 358 | [ |
|---|
| 359 | AC_MSG_RESULT([hack]) |
|---|
| 360 | AC_DEFINE_UNQUOTED([ss_family], [__ss_family], [sockaddr_storage.ss_family wrapper]) |
|---|
| 361 | ], |
|---|
| 362 | [AC_MSG_ERROR([Invalid struct sockaddr_storage])] |
|---|
| 363 | )] |
|---|
| 364 | ) |
|---|
| 365 | |
|---|
| 366 | dnl see if poll() is found from libpoll |
|---|
| 367 | AC_CHECK_LIB([poll], [poll], [LIBS="$LIBS -lpoll"]) |
|---|
| 368 | |
|---|
| 369 | if test "${enable_usb}" = "yes"; then |
|---|
| 370 | PKG_CHECK_MODULES( |
|---|
| 371 | [LIBUSB], |
|---|
| 372 | [libusb], |
|---|
| 373 | [AC_DEFINE([ENABLE_LIBUSB], [1], [Have libusb libraries and header files])], |
|---|
| 374 | [AC_MSG_ERROR([Cannot detect libusb])] |
|---|
| 375 | ) |
|---|
| 376 | fi |
|---|
| 377 | |
|---|
| 378 | if test "${enable_pcsc}" = "yes"; then |
|---|
| 379 | case "$host" in |
|---|
| 380 | *-*-darwin*) |
|---|
| 381 | if test -z "$PCSC_LIBS" -a -z "$PCSC_LIBS"; then |
|---|
| 382 | PCSC_MSG=yes |
|---|
| 383 | PCSC_CFLAGS="" |
|---|
| 384 | PCSC_LIBS="-Wl,-framework,PCSC" |
|---|
| 385 | fi |
|---|
| 386 | ;; |
|---|
| 387 | *) |
|---|
| 388 | PKG_CHECK_MODULES( |
|---|
| 389 | [PCSC], |
|---|
| 390 | [libpcsclite], |
|---|
| 391 | , |
|---|
| 392 | [AC_MSG_ERROR([Cannot locate pcsc-lite])] |
|---|
| 393 | ) |
|---|
| 394 | ;; |
|---|
| 395 | esac |
|---|
| 396 | fi |
|---|
| 397 | |
|---|
| 398 | if test "${enable_usb}" = "yes"; then |
|---|
| 399 | OPTIONAL_LIBUSB_CFLAGS="${LIBUSB_CFLAGS}" |
|---|
| 400 | OPTIONAL_LIBUSB_LIBS="${LIBUSB_LIBS}" |
|---|
| 401 | fi |
|---|
| 402 | |
|---|
| 403 | AC_DEFINE_UNQUOTED([OPENCT_CONF_PATH], ["${full_sysconfdir}/openct.conf"], [default config file for libopenct]) |
|---|
| 404 | AC_DEFINE_UNQUOTED([OPENCT_MODULES_PATH], ["${ifddir}"], [modules path for libopenct]) |
|---|
| 405 | OPENCT_SOCKET_PATH="${full_localstatedir}/run/openct" |
|---|
| 406 | AC_DEFINE_UNQUOTED([OPENCT_SOCKET_PATH], ["${OPENCT_SOCKET_PATH}"], [socket path for libopenct]) |
|---|
| 407 | AC_DEFINE_UNQUOTED([OPENCT_IFDHANDLER_PATH], ["${usrsbindir}/ifdhandler"], [ifdhandler path for libopenct]) |
|---|
| 408 | |
|---|
| 409 | AC_CREATE_STDINT_H([src/include/openct/types.h]) |
|---|
| 410 | |
|---|
| 411 | if test "${enable_pedantic}" = "yes"; then |
|---|
| 412 | enable_strict="yes"; |
|---|
| 413 | CFLAGS="${CFLAGS} -pedantic" |
|---|
| 414 | fi |
|---|
| 415 | if test "${enable_strict}" = "yes"; then |
|---|
| 416 | CFLAGS="${CFLAGS} -Wall -Wextra" |
|---|
| 417 | fi |
|---|
| 418 | |
|---|
| 419 | pkgconfigdir="\$(libdir)/pkgconfig" |
|---|
| 420 | openctincludedir="\$(includedir)/openct" |
|---|
| 421 | |
|---|
| 422 | AC_SUBST([pkgconfigdir]) |
|---|
| 423 | AC_SUBST([openctincludedir]) |
|---|
| 424 | AC_SUBST([apidocdir]) |
|---|
| 425 | AC_SUBST([bundledir]) |
|---|
| 426 | AC_SUBST([ifddir]) |
|---|
| 427 | AC_SUBST([udevdir]) |
|---|
| 428 | AC_SUBST([hotplugdir]) |
|---|
| 429 | AC_SUBST([daemon_user]) |
|---|
| 430 | AC_SUBST([daemon_groups]) |
|---|
| 431 | AC_SUBST([OPENCT_VERSION_MAJOR]) |
|---|
| 432 | AC_SUBST([OPENCT_VERSION_MINOR]) |
|---|
| 433 | AC_SUBST([OPENCT_VERSION_FIX]) |
|---|
| 434 | AC_SUBST([OPENCT_LT_CURRENT]) |
|---|
| 435 | AC_SUBST([OPENCT_LT_REVISION]) |
|---|
| 436 | AC_SUBST([OPENCT_LT_AGE]) |
|---|
| 437 | AC_SUBST([OPENCT_LT_OLDEST]) |
|---|
| 438 | AC_SUBST([OPTIONAL_LIBUSB_CFLAGS]) |
|---|
| 439 | AC_SUBST([OPTIONAL_LIBUSB_LIBS]) |
|---|
| 440 | AC_SUBST([OPENCT_SOCKET_PATH]) |
|---|
| 441 | AC_SUBST([ENABLE_NON_PRIVILEGED]) |
|---|
| 442 | |
|---|
| 443 | AM_CONDITIONAL([SVN_CHECKOUT], [test "${svn_checkout}" = "yes"]) |
|---|
| 444 | AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"]) |
|---|
| 445 | AM_CONDITIONAL([ENABLE_API_DOC], [test "${enable_api_doc}" = "yes"]) |
|---|
| 446 | AM_CONDITIONAL([ENABLE_BUNDLES], [test -n "${bundledir}"]) |
|---|
| 447 | AM_CONDITIONAL([ENABLE_UDEV], [test -n "${udevdir}"]) |
|---|
| 448 | AM_CONDITIONAL([ENABLE_HOTPLUG], [test -n "${hotplugdir}"]) |
|---|
| 449 | AM_CONDITIONAL([ENABLE_PCSC], [test "${enable_pcsc}" = "yes"]) |
|---|
| 450 | |
|---|
| 451 | AC_CONFIG_FILES([ |
|---|
| 452 | Makefile |
|---|
| 453 | doc/Makefile |
|---|
| 454 | doc/doxygen.conf |
|---|
| 455 | doc/nonpersistent/Makefile |
|---|
| 456 | etc/Makefile |
|---|
| 457 | macos/Makefile |
|---|
| 458 | src/Makefile |
|---|
| 459 | src/ct/Makefile |
|---|
| 460 | src/ct/libopenct.pc |
|---|
| 461 | src/ctapi/Makefile |
|---|
| 462 | src/ifd/Makefile |
|---|
| 463 | src/include/Makefile |
|---|
| 464 | src/include/openct/Makefile |
|---|
| 465 | src/pcsc/Makefile |
|---|
| 466 | src/tools/Makefile |
|---|
| 467 | src/tools/openct-tool.1 |
|---|
| 468 | ]) |
|---|
| 469 | AC_OUTPUT |
|---|
| 470 | |
|---|
| 471 | cat <<EOF |
|---|
| 472 | |
|---|
| 473 | OpenCT has been configured with the following options: |
|---|
| 474 | |
|---|
| 475 | |
|---|
| 476 | Version: ${PACKAGE_VERSION} |
|---|
| 477 | Libraries: $(eval eval eval echo "${libdir}") |
|---|
| 478 | |
|---|
| 479 | doc support: ${enable_doc} |
|---|
| 480 | api doc support: ${enable_api_doc} |
|---|
| 481 | usb support: ${enable_usb} |
|---|
| 482 | pcsc support: ${enable_pcsc} |
|---|
| 483 | non-privileged support: ${ENABLE_NON_PRIVILEGED} |
|---|
| 484 | |
|---|
| 485 | Host: ${host} |
|---|
| 486 | Compiler: ${CC} |
|---|
| 487 | Preprocessor flags: ${CPPFLAGS} |
|---|
| 488 | Compiler flags: ${CFLAGS} |
|---|
| 489 | Linker flags: ${LDFLAGS} |
|---|
| 490 | Libraries: ${LIBS} |
|---|
| 491 | |
|---|
| 492 | LIBUSB_CFLAGS: ${LIBUSB_CFLAGS} |
|---|
| 493 | LIBUSB_LIBS: ${LIBUSB_LIBS} |
|---|
| 494 | PCSC_CFLAGS: ${PCSC_CFLAGS} |
|---|
| 495 | PCSC_LIBS: ${PCSC_LIBS} |
|---|
| 496 | |
|---|
| 497 | bundledir: ${bundledir} |
|---|
| 498 | ifddir: ${ifddir} |
|---|
| 499 | udevdir: ${udevdir} |
|---|
| 500 | hotplugdir: ${hotplugdir} |
|---|
| 501 | |
|---|
| 502 | daemon user: ${daemon_user} |
|---|
| 503 | daemon groups: ${daemon_groups} |
|---|
| 504 | |
|---|
| 505 | EOF |
|---|
| 506 | |
|---|
| 507 | # Only Linux uses libusb |
|---|
| 508 | case "${host}" in |
|---|
| 509 | *-*-linux*) |
|---|
| 510 | if test "${enable_usb}" != "yes"; then |
|---|
| 511 | |
|---|
| 512 | cat <<EOF |
|---|
| 513 | |
|---|
| 514 | Without libusb coldplugging will work in basic way, |
|---|
| 515 | To use usb devices, your hotplugging needs to be |
|---|
| 516 | configured and you need to plug in any device |
|---|
| 517 | after the system has started (i.e. the init script ran) |
|---|
| 518 | |
|---|
| 519 | EOF |
|---|
| 520 | |
|---|
| 521 | fi |
|---|
| 522 | ;; |
|---|
| 523 | esac |
|---|