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