1dnl Process this file with autoconf to produce a configure script. 2 3AC_PREREQ(2.57) 4 5AC_INIT 6AM_SILENT_RULES([yes]) 7 8# Making releases: 9# VERSION_PATCHLEVEL += 1; 10# OWFS_INTERFACE_AGE += 1; 11# OWFS_BINARY_AGE += 1; 12# if any functions have been added, set OWFS_INTERFACE_AGE to 0. 13# if backwards compatibility has been broken, 14# set OWFS_BINARY_AGE _and_ OWFS_INTERFACE_AGE to 0. 15# (In our case it's better to always keep AGE to 0, since nobody else will use our library) 16 17VERSION_MAJOR=3 18VERSION_MINOR=2 19VERSION_PATCHLEVEL=4 20 21OWFS_INTERFACE_AGE=0 22OWFS_BINARY_AGE=0 23 24AC_SUBST(VERSION_MAJOR) 25AC_SUBST(VERSION_MINOR) 26AC_SUBST(VERSION_PATCHLEVEL) 27AC_SUBST(OWFS_INTERFACE_AGE) 28AC_SUBST(OWFS_BINARY_AGE) 29 30LT_CURRENT=`expr $VERSION_PATCHLEVEL - $OWFS_INTERFACE_AGE` 31LT_REVISION=$OWFS_INTERFACE_AGE 32LT_AGE=`expr $OWFS_BINARY_AGE - $OWFS_INTERFACE_AGE` 33 34AC_SUBST(LT_CURRENT)dnl 35AC_SUBST(LT_REVISION)dnl 36AC_SUBST(LT_AGE)dnl 37 38LT_RELEASE=$VERSION_MAJOR.$VERSION_MINOR 39AC_SUBST(LT_RELEASE)dnl 40 41VERSION="${VERSION_MAJOR}.${VERSION_MINOR}p${VERSION_PATCHLEVEL}" 42AC_SUBST(VERSION)dnl 43 44PACKAGE="owfs" 45AC_SUBST(PACKAGE)dnl 46 47AC_MSG_RESULT(Configuring ${PACKAGE}-${VERSION}) 48 49AC_CONFIG_AUX_DIR(src/scripts/install)dnl 50 51AC_CONFIG_MACRO_DIR([src/scripts/m4]) 52 53AC_CANONICAL_TARGET 54AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})dnl 55 56PKG_PROG_PKG_CONFIG 57PKG_INSTALLDIR 58 59# Process config.h.in 60AH_TOP([ 61#ifndef OWCONFIG_H 62 #define OWCONFIG_H 63]) 64AH_BOTTOM([#endif]) 65AM_CONFIG_HEADER(src/include/config.h) 66 67AC_PREFIX_DEFAULT(/opt/owfs)dnl 68 69AC_PATH_PROG(ECHO,echo,,$PATH)dnl 70AC_PATH_PROG(TEST,test,,$PATH)dnl 71AC_PATH_PROG(RM,rm,,$PATH)dnl 72AC_PATH_PROG(RPM,rpm,,$PATH)dnl 73AC_PATH_PROG(RPMBUILD,rpmbuild,,$PATH)dnl 74 75# swig support 76AC_ARG_VAR([SWIG], [path to SWIG utility]) 77AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) 78 79AC_PATH_PROG([SOELIM],[soelim]) 80AM_CONDITIONAL([SOELIM], [test -n "${SOELIM}"]) 81# This macro should appair before any other PKG_* macro 82PKG_PROG_PKG_CONFIG 83 84# Check for additional programs 85 86# We don't need c++ right now. 87#AC_PROG_CXX 88AC_PROG_CC 89AC_PROG_CPP 90AC_PROG_INSTALL 91AC_LIBTOOL_WIN32_DLL 92AC_PROG_LN_S 93AC_PROG_MAKE_SET 94AC_PROG_AWK 95AC_LIBTOOL_DLOPEN 96AM_PROG_LIBTOOL 97AC_SUBST(LIBTOOL_DEPS) 98 99# Supposedly this helps OS X compiling 100AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features]) 101 102HAVE_DEBIAN="false" 103AC_MSG_CHECKING([if debian-system is used]) 104AC_ARG_ENABLE(debian, 105[ --enable-debian Enable debian-system (default false)], 106[ 107 AC_MSG_RESULT([$enableval]) 108 if test "$enableval" = "yes" ; then 109 HAVE_DEBIAN="true" 110 fi 111], 112[ 113 AC_MSG_RESULT([no (default)]) 114]) 115AC_SUBST(HAVE_DEBIAN) 116AM_CONDITIONAL(HAVE_DEBIAN, test "${HAVE_DEBIAN}" = "true") 117 118 119HAVE_DARWIN="false" 120HAVE_FREEBSD="false" 121HAVE_CYGWIN="false" 122 123AC_MSG_CHECKING([for special host]) 124case "$host" in 125 *-*-cygwin*) 126 HAVE_CYGWIN="true" 127 CFLAGS="$CFLAGS -mwin32 -g" 128 AC_MSG_RESULT([Cygwin]) 129 ;; 130 *-darwin*) 131 HAVE_DARWIN="true" 132 AC_MSG_RESULT([Darwin]) 133 ;; 134 *-freebsd*) 135 HAVE_FREEBSD="true" 136 AC_MSG_RESULT([FreeBSD]) 137 ;; 138 *) 139 AC_MSG_RESULT([Other host]) 140 ;; 141esac 142AC_SUBST(HAVE_DARWIN) 143AM_CONDITIONAL(HAVE_DARWIN, test "${HAVE_DARWIN}" = "true") 144AC_SUBST(HAVE_CYGWIN) 145AM_CONDITIONAL(HAVE_CYGWIN, test "${HAVE_CYGWIN}" = "true") 146AC_SUBST(HAVE_FREEBSD) 147AM_CONDITIONAL(HAVE_FREEBSD, test "${HAVE_FREEBSD}" = "true") 148 149# launchd using the new launch_activate_socket 150AC_CHECK_FUNCS(launch_activate_socket) 151# AC_CHECK_HEADERS(launch.h) 152 153AM_CPPFLAGS="" 154AC_SUBST([AM_CPPFLAGS]) 155 156PIC_FLAGS="" 157if test "$lt_prog_compiler_pic_works" = yes; then 158 PIC_FLAGS="$lt_prog_compiler_pic" 159fi 160AC_SUBST(PIC_FLAGS) 161 162# Make sure tclConfig.sh is found under /usr/lib64/ 163# Should perhaps support cross-compiling to other cpu-type too? 164LIBPOSTFIX= 165case "${host_os}" in 166 *linux* ) 167 case "${host_cpu}" in 168 powerpc64 | s390x | x86_64 ) 169 LIBPOSTFIX="64" 170 CFLAGS="$CFLAGS -m64" 171 ;; 172 esac 173 ;; 174esac 175AC_SUBST(LIBPOSTFIX) 176 177# Set C Standard and other flags applicable to all compilers 178CFLAGS="$CFLAGS -std=c99" 179 180if test "$cross_compiling" != yes; then 181 OW_CHECK_NESTED_FUNCTIONS 182fi 183 184OWFSROOT="`pwd`" 185AC_SUBST(OWFSROOT) 186 187m4_include([src/scripts/m4/acx_pthread.m4]) 188 189# Checks for header files. 190AC_HEADER_DIRENT 191AC_HEADER_STDC 192AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h]) 193AC_CHECK_HEADERS([linux/limits.h linux/types.h netdb.h dlfcn.h]) 194AC_CHECK_HEADERS(sys/event.h sys/inotify.h) 195AC_HEADER_MAJOR 196 197# Test if debugging out enabled 198ENABLE_DEBUG="true" 199AC_MSG_CHECKING([if debug-output is enabled]) 200AC_ARG_ENABLE(debug, 201[ --enable-debug Enable debug-output (default true)], 202[ 203 AC_MSG_RESULT([$enableval]) 204 if ! test "$enableval" = "yes" ; then 205 ENABLE_DEBUG="false" 206 fi 207], 208[ 209 AC_MSG_RESULT([yes (default)]) 210]) 211AC_SUBST(ENABLE_DEBUG) 212AM_CONDITIONAL(ENABLE_DEBUG, test "${ENABLE_DEBUG}" = "true") 213 214# Test if mutex-debugging is enabled. Should not be enabled for smaller embedded systems 215ENABLE_MUTEX_DEBUG="true" 216AC_MSG_CHECKING([if mutexdebug is enabled]) 217AC_ARG_ENABLE(mutexdebug, 218[ --enable-mutexdebug Enable mutexdebug-output (default true)], 219[ 220 AC_MSG_RESULT([$enableval]) 221 if ! test "$enableval" = "yes" ; then 222 ENABLE_MUTEX_DEBUG="false" 223 fi 224], 225[ 226 AC_MSG_RESULT([yes (default)]) 227]) 228AC_SUBST(ENABLE_MUTEX_DEBUG) 229AM_CONDITIONAL(ENABLE_MUTEX_DEBUG, test "${ENABLE_MUTEX_DEBUG}" = "true") 230 231# Test if OWSHELL should be supported 232ENABLE_OWSHELL="true" 233AC_MSG_CHECKING([if OWSHELL support is enabled]) 234AC_ARG_ENABLE(owshell, 235[ --enable-owshell Enable owshell support (default true)], 236[ 237 AC_MSG_RESULT([$enableval]) 238 if ! test "$enableval" = "yes" ; then 239 ENABLE_OWSHELL="false" 240 fi 241], 242[ 243 AC_MSG_RESULT([yes (default)]) 244]) 245AC_SUBST(ENABLE_OWSHELL) 246AM_CONDITIONAL(ENABLE_OWSHELL, test "${ENABLE_OWSHELL}" = "true") 247 248# Test if OWLIB should be supported 249ENABLE_OWLIB="true" 250AC_MSG_CHECKING([if OWLIB support is enabled]) 251AC_ARG_ENABLE(owlib, 252[ --enable-owlib Enable owlib support (default true)], 253[ 254 AC_MSG_RESULT([$enableval]) 255 if ! test "$enableval" = "yes" ; then 256 ENABLE_OWLIB="false" 257 fi 258], 259[ 260 AC_MSG_RESULT([yes (default)]) 261]) 262AC_SUBST(ENABLE_OWLIB) 263AM_CONDITIONAL(ENABLE_OWLIB, test "${ENABLE_OWLIB}" = "true") 264 265# Test if OWNETLIB should be supported 266ENABLE_OWNETLIB="true" 267AC_MSG_CHECKING([if OWNETLIB support is enabled]) 268AC_ARG_ENABLE(ownetlib, 269[ --enable-ownetlib Enable ownetlib support (default true)], 270[ 271 AC_MSG_RESULT([$enableval]) 272 if ! test "$enableval" = "yes" ; then 273 ENABLE_OWNETLIB="false" 274 fi 275], 276[ 277 AC_MSG_RESULT([yes (default)]) 278]) 279AC_SUBST(ENABLE_OWNETLIB) 280AM_CONDITIONAL(ENABLE_OWNETLIB, test "${ENABLE_OWNETLIB}" = "true") 281 282# Check for threading 283ACX_PTHREAD 284if test "$acx_pthread_ok" = "yes"; then 285 #CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 286 # can't set pthread flags for all compilations, since owshell doesn't need it. 287 if test "$cross_compiling" = yes; then 288 # We need to link libow.so with -lpthread on some cross-platforms 289 # since owtcl.so doesn't work otherwise. -pthread is not enough 290 if test x"$PTHREAD_LIBS" = x -a "x$PTHREAD_CFLAGS" = "x-pthread"; then 291 AC_MSG_RESULT([add -lpthread to PTHREAD_LIBS]) 292 PTHREAD_LIBS="-lpthread" 293 fi 294 fi 295 296 ENABLE_MT="true" 297else 298 ENABLE_MT="false" 299 PTHREAD_CFLAGS="" 300 PTHREAD_LIBS="" 301 PTHREAD_CC="" 302fi 303 304# Check for i2c support 305ENABLE_I2C="true" 306AC_MSG_CHECKING([if i2c(DS2482-x00) is enabled]) 307AC_ARG_ENABLE(i2c, 308[ --enable-i2c Enable i2c (DS2482-x00) support (default true)], 309[ 310 AC_MSG_RESULT([$enableval]) 311 if ! test "$enableval" = "yes" ; then 312 ENABLE_I2C="false" 313 fi 314], 315[ 316 AC_MSG_RESULT([yes (default)]) 317]) 318 319AC_SUBST(ENABLE_I2C) 320AM_CONDITIONAL(ENABLE_I2C, test "${ENABLE_I2C}" = "true") 321 322 323# Check for W1 (linux kernel module) 324ENABLE_W1="true" 325AC_MSG_CHECKING([if W1 is enabled]) 326AC_ARG_ENABLE(w1, 327[ --enable-w1 Enable w1 support (default true)], 328[ 329 AC_MSG_RESULT([$enableval]) 330 if ! test "$enableval" = "yes" ; then 331 ENABLE_W1="false" 332 fi 333], 334[ 335 AC_MSG_RESULT([yes (default)]) 336]) 337AC_SUBST(ENABLE_W1) 338AM_CONDITIONAL(ENABLE_W1, test "${ENABLE_W1}" = "true") 339 340 341# Check if the modules are enabled 342 343#Check owhttpd 344ENABLE_OWHTTPD="true" 345AC_MSG_CHECKING(if owhttpd is enabled) 346AC_ARG_ENABLE(owhttpd, 347[ --enable-owhttpd Enable owhttpd module (default true)], 348[ 349 AC_MSG_RESULT([$enableval]) 350 if test ! "$enableval" = "yes" ; then 351 ENABLE_OWHTTPD="false" 352 else 353 ENABLE_OWLIB="true" 354 fi 355], 356[ 357 ENABLE_OWLIB="true" 358 AC_MSG_RESULT([yes (default)]) 359]) 360AC_SUBST(ENABLE_OWHTTPD) 361AM_CONDITIONAL(ENABLE_OWHTTPD, test "${ENABLE_OWHTTPD}" = "true") 362 363#Check owftpd 364ENABLE_OWFTPD="true" 365AC_MSG_CHECKING(if owftpd is enabled) 366AC_ARG_ENABLE(owftpd, 367[ --enable-owftpd Enable owftpd module (default true)], 368[ 369 AC_MSG_RESULT([$enableval]) 370 if test ! "$enableval" = "yes" ; then 371 ENABLE_OWFTPD="false" 372 else 373# if test ! "${ENABLE_MT}" = "true" ; then 374# AC_MSG_ERROR([owftpd needs multithreading]) 375# fi 376 ENABLE_OWLIB="true" 377 fi 378], 379[ 380 if test "${ENABLE_MT}" = "true" ; then 381 ENABLE_OWLIB="true" 382 AC_MSG_RESULT([yes (default)]) 383 else 384 ENABLE_OWFTPD="false" 385 AC_MSG_RESULT([no (multithreading needed)]) 386 fi 387]) 388AC_SUBST(ENABLE_OWFTPD) 389AM_CONDITIONAL(ENABLE_OWFTPD, test "${ENABLE_OWFTPD}" = "true") 390 391 392#Check owserver 393AC_MSG_CHECKING(if owserver is enabled) 394ENABLE_OWSERVER="true" 395AC_ARG_ENABLE(owserver, 396[ --enable-owserver Enable owserver module (default true)], 397[ 398 AC_MSG_RESULT([$enableval]) 399 if test ! "$enableval" = "yes" ; then 400 ENABLE_OWSERVER="false" 401 else 402 ENABLE_OWLIB="true" 403 fi 404], 405[ 406 ENABLE_OWLIB="true" 407 AC_MSG_RESULT([yes (default)]) 408]) 409AC_SUBST(ENABLE_OWSERVER) 410AM_CONDITIONAL(ENABLE_OWSERVER, test "${ENABLE_OWSERVER}" = "true") 411 412#Check owexternal 413AC_MSG_CHECKING(if owexternal is enabled) 414ENABLE_OWEXTERNAL="true" 415AC_ARG_ENABLE(owexternal, 416[ --enable-owexternal Enable owexternal module (default true)], 417[ 418 AC_MSG_RESULT([$enableval]) 419 if test ! "$enableval" = "yes" ; then 420 ENABLE_OWEXTERNAL="false" 421 else 422 ENABLE_OWLIB="true" 423 fi 424], 425[ 426 ENABLE_OWLIB="true" 427 AC_MSG_RESULT([yes (default)]) 428]) 429AC_SUBST(ENABLE_OWEXTERNAL) 430AM_CONDITIONAL(ENABLE_OWEXTERNAL, test "${ENABLE_OWEXTERNAL}" = "true") 431 432#Check ownet 433ENABLE_OWNET="true" 434AC_MSG_CHECKING(if ownet is enabled) 435AC_ARG_ENABLE(ownet, 436[ --enable-ownet Enable ownet module (default true)], 437[ 438 AC_MSG_RESULT([$enableval]) 439 if test ! "$enableval" = "yes" ; then 440 ENABLE_OWNET="false" 441 else 442 ENABLE_OWLIB="true" 443 fi 444], 445[ 446 ENABLE_OWLIB="true" 447 AC_MSG_RESULT([yes (default)]) 448]) 449AC_SUBST(ENABLE_OWNET) 450AM_CONDITIONAL(ENABLE_OWNET, test "${ENABLE_OWNET}" = "true") 451 452 453#Check owtap 454ENABLE_OWTAP="true" 455AC_MSG_CHECKING(if owtap is enabled) 456AC_ARG_ENABLE(owtap, 457[ --enable-owtap Enable owtap module (default true)], 458[ 459 AC_MSG_RESULT([$enableval]) 460 if test ! "$enableval" = "yes" ; then 461 ENABLE_OWTAP="false" 462 fi 463], 464[ 465 AC_MSG_RESULT([yes (default)]) 466]) 467AC_SUBST(ENABLE_OWTAP) 468AM_CONDITIONAL(ENABLE_OWTAP, test "${ENABLE_OWTAP}" = "true") 469 470 471#Check owmalloc (special memory allocation routines) 472ENABLE_OWMALLOC="false" 473AC_MSG_CHECKING(if owmalloc is enabled) 474AC_ARG_ENABLE(owmalloc, 475[ --enable-owmalloc Enable owmalloc checking (default false)], 476[ 477 AC_MSG_RESULT([$enableval]) 478 if test "$enableval" = "yes" ; then 479 ENABLE_OWMALLOC="true" 480 fi 481], 482[ 483 AC_MSG_RESULT([no (default)]) 484]) 485AC_SUBST(ENABLE_OWMALLOC) 486AM_CONDITIONAL(ENABLE_OWMALLOC, test "${ENABLE_OWMALLOC}" = "true") 487 488 489#Check owmon 490AC_MSG_CHECKING(if owmon is enabled) 491ENABLE_OWMON="true" 492AC_ARG_ENABLE(owmon, 493[ --enable-owmon Enable owmon module (default true)], 494[ 495 AC_MSG_RESULT([$enableval]) 496 if test ! "$enableval" = "yes" ; then 497 ENABLE_OWMON="false" 498 fi 499], 500[ 501 AC_MSG_RESULT([yes (default)]) 502]) 503AC_SUBST(ENABLE_OWMON) 504AM_CONDITIONAL(ENABLE_OWMON, test "${ENABLE_OWMON}" = "true") 505 506#Check owcapi 507AC_MSG_CHECKING(if owcapi is enabled) 508ENABLE_OWCAPI="true" 509AC_ARG_ENABLE(owcapi, 510[ --enable-owcapi Enable owcapi module (default true)], 511[ 512 AC_MSG_RESULT([$enableval]) 513 if test ! "$enableval" = "yes" ; then 514 ENABLE_OWCAPI="false" 515 else 516 ENABLE_OWLIB="true" 517 fi 518], 519[ 520 ENABLE_OWLIB="true" 521 AC_MSG_RESULT([yes (default)]) 522]) 523AC_SUBST(ENABLE_OWCAPI) 524AM_CONDITIONAL(ENABLE_OWCAPI, test "${ENABLE_OWCAPI}" = "true") 525 526 527#Check swig 528AC_MSG_CHECKING(if swig is enabled) 529if test -z "$SWIG" ; then 530 ENABLE_SWIG="false" 531else 532 ENABLE_SWIG="auto" 533fi 534AC_ARG_ENABLE(swig, 535[ --enable-swig Enable swig (default auto)], 536[ 537 if test "$enableval" = "no"; then 538 ENABLE_SWIG="false" 539 SWIG="" 540 AC_MSG_RESULT([no]) 541 else 542 if test -z "$SWIG"; then 543 AC_MSG_ERROR([Swig is not found and could not be enabled]) 544 fi 545 ENABLE_OWLIB="true" 546 ENABLE_SWIG="true" 547 AC_MSG_RESULT([yes]) 548 fi 549], 550[ 551 AC_MSG_RESULT([auto (default)]) 552]) 553if test "${HAVE_CYGWIN}" = "true"; then 554 if test ! "$ENABLE_SWIG" = "true"; then 555 ENABLE_SWIG="false" 556 SWIG="" 557 AC_MSG_RESULT([(Disable swig by default in Cygwin)]) 558 fi 559else 560 if test "$ENABLE_SWIG" = "auto"; then 561 ENABLE_SWIG="true" 562 fi 563fi 564AC_SUBST(ENABLE_SWIG) 565AM_CONDITIONAL(ENABLE_SWIG, test "${ENABLE_SWIG}" = "true") 566 567#Check owperl 568AC_MSG_CHECKING(if owperl is enabled) 569ENABLE_OWPERL="true" 570AC_ARG_ENABLE(owperl, 571[ --enable-owperl Enable owperl module (default true)], 572[ 573 AC_MSG_RESULT([$enableval]) 574 if test ! "$enableval" = "yes" ; then 575 ENABLE_OWPERL="false" 576 else 577 if test -z "$SWIG" ; then 578 AC_MSG_WARN([Cannot find swig program. Look for it at http://www.swig.org or use CPAN]) 579 AC_MSG_WARN([OWPERL is disabled because swig is not found]) 580 ENABLE_OWPERL="false" 581 fi 582 fi 583], 584[ 585 if test -z "$SWIG" ; then 586 AC_MSG_RESULT([no (swig disabled)]) 587 ENABLE_OWPERL="false" 588 else 589 AC_MSG_RESULT([yes (default)]) 590 fi 591]) 592 593PERL="" 594if test "${ENABLE_OWPERL}" = "true"; then 595 m4_include(module/swig/perl5/perl5.m4) 596 AC_MSG_RESULT(Looking for location of Perl executable) 597 SC_PATH_PERL5 598 AC_SUBST(PERL5EXT) 599 AC_SUBST(PERL5DYNAMICLINKING) 600 AC_SUBST(PERL5LIB) 601 AC_SUBST(PERL5DIR) 602 AC_SUBST(PERL5NAME) 603 AC_SUBST(PERL5CCFLAGS) 604 if test -z "${PERL}" ; then 605 AC_MSG_WARN([Cannot find perl binary.]) 606 AC_MSG_WARN([OWPERL is disabled because perl binary is not found]) 607 ENABLE_OWPERL="false" 608 else 609 if test -z "${PERL5NAME}" ; then 610 AC_MSG_WARN([Cannot find perl library. Install perl-devel package.]) 611 AC_MSG_WARN([OWPERL is disabled because perl library is not found]) 612 ENABLE_OWPERL="false" 613 fi 614 fi 615fi 616AC_SUBST(PERL) 617AC_SUBST(ENABLE_OWPERL) 618AM_CONDITIONAL(ENABLE_OWPERL, test "${ENABLE_OWPERL}" = "true") 619if test -z "$PERL" ; then 620 ENABLE_PERL="false" 621else 622 ENABLE_PERL="true" 623fi 624AC_SUBST(ENABLE_PERL) 625AM_CONDITIONAL(ENABLE_PERL, test "${ENABLE_PERL}" = "true") 626 627#Check owphp 628AC_MSG_CHECKING(if owphp is enabled) 629ENABLE_OWPHP="true" 630AC_ARG_ENABLE(owphp, 631 [AS_HELP_STRING([--enable-owphp], 632 [Enable owphp module (default true)])], 633 [ 634 AC_MSG_RESULT([$enableval]) 635 if test "$enableval" = "no" ; then 636 ENABLE_OWPHP="false" 637 fi 638 if test "$enableval" = "yes" ; then 639 ENABLE_OWPHP="true" 640 fi 641 if test -z "$SWIG" ; then 642 AC_MSG_WARN([OWPHP is disabled because swig is not found]) 643 ENABLE_OWPHP="false" 644 fi 645 ], 646 [ 647 if test -z "$SWIG" ; then 648 AC_MSG_RESULT([no (swig disabled)]) 649 ENABLE_OWPHP="false" 650 else 651 AC_MSG_RESULT([yes (default)]) 652 fi 653 ]) 654 655PHP="" 656PHPVMAJOR="" 657if test "${ENABLE_OWPHP}" = "true" ; then 658 m4_include(module/swig/php/php.m4) 659 AC_MSG_NOTICE([Looking for location of php executable]) 660 SC_PATH_PHP 661 AC_SUBST(PHPCONFIG) 662 AC_SUBST(PHPINC) 663 AC_SUBST(PHPEXT) 664 AC_SUBST(PHPLIBDIR) 665 if test -z "${PHP}" ; then 666 AC_MSG_WARN([Cannot find php binary. Install php or php5 package]) 667 AC_MSG_WARN([OWPHP is disabled because php binary is not found]) 668 ENABLE_OWPHP="false" 669 else 670 if test -z "${PHPCONFIG}" ; then 671 AC_MSG_WARN([Cannot find php-config binary. Install php-devel or php5-dev package]) 672 fi 673 if test -z "${PHPINC}" ; then 674 AC_MSG_WARN([Cannot find php include-file. Install php-devel or php5-dev package]) 675 AC_MSG_WARN([OWPHP is disabled because php include-file is not found]) 676 ENABLE_OWPHP="false" 677 else 678 if test -z "${PHPLIBDIR}" ; then 679 AC_MSG_WARN([Cannot find php extension-dir. Install php-devel or php5-dev package]) 680 AC_MSG_WARN([OWPHP is disabled because php extension-dir is not found]) 681 ENABLE_OWPHP="false" 682 fi 683 fi 684 fi 685fi 686AC_SUBST(PHP) 687AC_SUBST(ENABLE_OWPHP) 688AM_CONDITIONAL(PHP7, test "${PHPVMAJOR}" = "7") 689AM_CONDITIONAL(ENABLE_OWPHP, test "${ENABLE_OWPHP}" = "true") 690if test -z "$PHP" ; then 691 ENABLE_PHP="false" 692else 693 ENABLE_PHP="true" 694fi 695AC_SUBST(ENABLE_PHP) 696AM_CONDITIONAL(ENABLE_PHP, test "${ENABLE_PHP}" = "true") 697 698 699#Check owpython 700AC_MSG_CHECKING(if owpython is enabled) 701ENABLE_OWPYTHON="true" 702AC_ARG_ENABLE(owpython, 703[ --enable-owpython Enable owpython module (default true)], 704[ 705 AC_MSG_RESULT([$enableval]) 706 if test "$enableval" = "no" ; then 707 ENABLE_OWPYTHON="false" 708 fi 709 if test "$enableval" = "yes" ; then 710 ENABLE_OWPYTHON="true" 711 if test -z "$SWIG" ; then 712 AC_MSG_WARN([Cannot find swig program. Look for it at http://www.swig.org or use CPAN]) 713 AC_MSG_WARN([OWPYTHON is disabled because swig is not found]) 714 ENABLE_OWPYTHON="false" 715 fi 716 fi 717], 718[ 719 if test -z "$SWIG" ; then 720 AC_MSG_RESULT([no (swig disabled)]) 721 ENABLE_OWPYTHON="false" 722 else 723 AC_MSG_RESULT([yes (default)]) 724 fi 725]) 726 727PYTHON="" 728if test "${ENABLE_OWPYTHON}" = "true" ; then 729 m4_include(module/swig/python/python.m4) 730 AC_MSG_RESULT(Looking for location of Python executable) 731 SC_PATH_PYTHON 732 AC_SUBST(PYVERSION) 733 AC_SUBST(PYSITEDIR) 734 AC_SUBST(PYTHONDYNAMICLINKING) 735 if test -z "${PYTHON}" ; then 736 AC_MSG_WARN([Cannot find python binary. Install python package.]) 737 AC_MSG_WARN([OWPYTHON is disabled because python binary is not found]) 738 ENABLE_OWPYTHON="false" 739 else 740 if test -z "${PYLDFLAGS}" ; then 741 AC_MSG_WARN([Cannot find python library. Install python-devel package.]) 742 AC_MSG_WARN([OWPYTHON is disabled because python library is not found]) 743 ENABLE_OWPYTHON="false" 744 else 745 if test -z "${PYCFLAGS}" ; then 746 AC_MSG_WARN([Cannot find python include-file. Install python-devel package.]) 747 AC_MSG_WARN([OWPYTHON is disabled because python include-file is not found]) 748 ENABLE_OWPYTHON="false" 749 fi 750 fi 751 fi 752fi 753AC_SUBST(ENABLE_OWPYTHON) 754AM_CONDITIONAL(ENABLE_OWPYTHON, test "${ENABLE_OWPYTHON}" = "true") 755AC_SUBST(PYTHON) 756if test -z "$PYTHON" ; then 757 ENABLE_PYTHON="false" 758else 759 ENABLE_PYTHON="true" 760fi 761AC_SUBST(ENABLE_PYTHON) 762AM_CONDITIONAL(ENABLE_PYTHON, test "${ENABLE_PYTHON}" = "true") 763 764#Check owtcl 765AC_MSG_CHECKING(if owtcl is enabled) 766ENABLE_OWTCL="true" 767AC_ARG_ENABLE(owtcl, 768[ --enable-owtcl Enable owtcl module (default true)], 769[ 770 AC_MSG_RESULT([$enableval]) 771 if test "$enableval" = "no" ; then 772 ENABLE_OWTCL="false" 773 fi 774 if test "$enableval" = "yes" ; then 775 ENABLE_OWTCL="true" 776 fi 777], 778[ 779 AC_MSG_RESULT([yes (default)]) 780]) 781 782if test "${ENABLE_OWTCL}" = "true" ; then 783 m4_include(module/owtcl/tcl.m4) 784 AC_MSG_RESULT(Looking for tclConfig.sh) 785 SC_PATH_TCLCONFIG 786 if test -z "$TCL_BIN_DIR" -o ! -f "$TCL_BIN_DIR/tclConfig.sh" ; then 787 AC_MSG_WARN([OWTCL is disabled because tclConfig.sh is not found]) 788 ENABLE_OWTCL="false" 789 else 790 SC_LOAD_TCLCONFIG 791 AC_SUBST(TCL_BIN_DIR) 792 AC_SUBST(TCL_SHLIB_CFLAGS) 793 AC_SUBST(TCL_SHLIB_LD) 794 AC_SUBST(TCL_SHLIB_LD_LIBS) 795 AC_SUBST(TCL_SHLIB_SUFFIX) 796 AC_SUBST(TCL_VERSION) 797 AC_SUBST(TCL_PREFIX) 798 AC_SUBST(TCL_EXEC_PREFIX) 799 AC_SUBST(TCL_CFLAGS) 800 AC_SUBST(TCL_DEFS) 801 AC_SUBST(TCL_LIB_SPEC) 802 AC_SUBST(TCL_LIBS) 803 AC_SUBST(TCL_LD_FLAGS) 804 AC_SUBST(TCL_COMPAT_OBJS) 805 AC_SUBST(TCL_LD_SEARCH_FLAGS) 806 AC_SUBST(TCL_SRC_DIR) 807 AC_SUBST(TCL_LIB_SPEC) 808 AC_SUBST(TCL_STUB_LIB_SPEC) 809 AC_SUBST(TCL_BUILD_LIB_SPEC) 810 AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) 811 AC_SUBST(TCL_INCLUDE_SPEC) 812 AC_SUBST(TCL_PACKAGE_PATH) 813 # guess that tcl will install the files under the first path in 814 # TCL_PACKAGE_PATH. TCL_BIN_DIR is usually correct, but this 815 # might contain staging_dir prefix when cross-compiling. 816 OWTCL_INSTALL_PATH="`echo ${TCL_PACKAGE_PATH} | cut -d' ' -f1`" 817 case "${host_cpu}-${host_os}" in 818 *-darwin*) 819 OWTCL_INSTALL_PATH="`echo ${TCL_BIN_DIR} | cut -d' ' -f1`" 820 ;; 821 *) 822 OWTCL_INSTALL_PATH="`echo ${TCL_PACKAGE_PATH} | cut -d' ' -f1`" 823 ;; 824 esac 825 # Debian Hack: do not install in /usr/local/lib/tcltk 826 # OWTCL_INSTALL_PATH="/usr/lib/tcltk" 827 AC_SUBST(OWTCL_INSTALL_PATH) 828 fi 829fi 830AC_SUBST(ENABLE_OWTCL) 831AM_CONDITIONAL(ENABLE_OWTCL, test "${ENABLE_OWTCL}" = "true") 832 833 834AC_DEFUN([ACX_EXPAND], [ 835 EXP_VAR=[$1] 836 FROM_VAR=[$2] 837 838 dnl first expand prefix and exec_prefix if necessary 839 prefix_save=$prefix 840 exec_prefix_save=$exec_prefix 841 842 dnl if no prefix given, then use /usr/local, the default prefix 843 if test "x$prefix" = "xNONE"; then 844 prefix=$ac_default_prefix 845 fi 846 dnl if no exec_prefix given, then use prefix 847 if test "x$exec_prefix" = "xNONE"; then 848 exec_prefix=$prefix 849 fi 850 851 full_var="$FROM_VAR" 852 dnl loop until it doesnt change anymore 853 while true; do 854 new_full_var="`eval echo $full_var`" 855 if test "x$new_full_var"="x$full_var"; then break; fi 856 full_var=$new_full_var 857 done 858 859 dnl clean up 860 full_var=$new_full_var 861 AC_SUBST([$1], "$full_var") 862 863 dnl restore prefix and exec_prefix 864 prefix=$prefix_save 865 exec_prefix=$exec_prefix_save 866]) dnl ACX_EXPAND 867 868ACX_EXPAND(LIBDIR, $libdir) 869ACX_EXPAND(BINDIR, $bindir) 870ACX_EXPAND(DATADIR, $datadir) 871 872EXTRACFLAGS="-D_FILE_OFFSET_BITS=64" 873AC_MSG_CHECKING([if cflag _XOPEN_SOURCE is required]) 874case "${host_cpu}-${host_os}" in 875 *-aix* | *solaris* | *-osf* | *-hpux*) 876 CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" 877 EXTRACFLAGS="$EXTRACFLAGS -D_XOPEN_SOURCE=500" 878 AC_MSG_RESULT([-D_XOPEN_SOURCE=500]) 879 ;; 880 *-darwin* | *-netbsd* | *-dragonfly*) 881 AC_MSG_RESULT([no]) 882 ;; 883 *-freebsd* | *) 884 # have to add this to support pthread_rwlock_t 885 CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600" 886 EXTRACFLAGS="$EXTRACFLAGS -D_XOPEN_SOURCE=600" 887 AC_MSG_RESULT([-D_XOPEN_SOURCE=600]) 888 ;; 889esac 890 891AC_MSG_CHECKING([if cflag _BSD_SOURCE is required]) 892case "${host_cpu}-${host_os}" in 893 *-dragonfly*) 894 AC_MSG_RESULT([no]) 895 ;; 896 *-netbsd*) 897 CFLAGS="$CFLAGS -D_NETBSD_SOURCE=1" 898 EXTRACFLAGS="$EXTRACFLAGS -D_NETBSD_SOURCE=1" 899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: -D_NETBSD_SOURCE=1" >&5 $as_echo "-D_NETBSD_SOURCE=1" >&6; } 900 ;; 901 *) 902 # have to add -D_BSD_SOURCE=1 to support major() in sys/sysmacros.h 903 # have to add -D_ISOC99_SOURCE=1 to support lrint() in bits/mathcalls.h 904 # have to add -D_POSIX_C_SOURCE=200112L for sem_timedwait 905 # have to add -D_POSIX_C_SOURCE=199309L for clock_gettime() 906 CFLAGS="$CFLAGS -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE" 907 EXTRACFLAGS="$EXTRACFLAGS -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE" 908 AC_MSG_RESULT([-D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE]) 909 ;; 910esac 911 912# should perhaps add _GNU_SOURCE=1 instead of the two defines above... 913# That would define _BSD_SOURCE, _SVID_SOURCE, _LARGEFILE64_SOURCE, 914# _XOPEN_SOURCE=600, _POSIX_C_SOURCE, _POSIX_SOURCE, _ISOC99_SOURCE 915 916 917# Check if extra libs are needed. Should perhaps test if they are available too 918# instead of hardcoding the libraries. 919EXTRALIBS="" 920AC_MSG_CHECKING([if extra libs are required]) 921case "${host_cpu}-${host_os}" in 922 *-darwin*) 923 # This will actually be duplicates if libusb is used. 924 OSLIBS="-Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation" 925 EXTRALIBS="" 926 AC_MSG_RESULT([${OSLIBS}]) 927 ;; 928 *-solaris*) 929 OSLIBS="" 930 EXTRALIBS=" -lsocket -lnsl " 931 LIBS="$LIBS -lsocket -lnsl" 932 AC_MSG_RESULT([${EXTRALIBS}]) 933 ;; 934 *) 935 OSLIBS="" 936 EXTRALIBS="" 937 AC_MSG_RESULT([${EXTRALIBS}]) 938 ;; 939esac 940 941#Check for profiling 942AC_MSG_CHECKING(if profiling is enabled) 943ENABLE_PROFILING="false" 944AC_ARG_ENABLE(profiling, 945[ --enable-profiling Enable profiling (default false)], 946[ 947 AC_MSG_RESULT([$enableval]) 948 if test "$enableval" = "yes" ; then 949 ENABLE_PROFILING=true 950 EXTRALIBS="$EXTRALIBS -pg" 951 EXTRACFLAGS="$EXTRACFLAGS -pg" 952 fi 953], 954[ 955 AC_MSG_RESULT([no (default)]) 956]) 957AC_SUBST(EXTRACFLAGS) 958AC_SUBST(ENABLE_PROFILING) 959AM_CONDITIONAL(ENABLE_PROFILING, test "${ENABLE_PROFILING}" = "true") 960ACX_EXPAND(LD_EXTRALIBS, $EXTRALIBS) 961AC_SUBST(LD_EXTRALIBS) 962AC_SUBST(OSLIBS) 963AC_MSG_WARN([LD_EXTRALIBS=${LD_EXTRALIBS} OSLIBS=${OSLIBS}]) 964 965AC_ARG_WITH(fuseinclude, 966 [ --with-fuseinclude=DIR FUSE-include from @<:@/usr/local/include@:>@], 967 [fuse_include_path=$withval], 968 [fuse_include_path='/usr/local/include']) 969AC_SUBST(fuse_include_path) 970 971AC_ARG_WITH(fuselib, 972 [ --with-fuselib=DIR FUSE-lib from @<:@/usr/local/lib@:>@], 973 [fuse_lib_path=$withval], 974 [fuse_lib_path='/usr/local/lib']) 975AC_SUBST(fuse_lib_path) 976 977 978#Check owfs 979AC_MSG_CHECKING([if owfs is enabled]) 980ENABLE_OWFS="auto" 981AC_ARG_ENABLE(owfs, 982[ --enable-owfs Enable owfs module (default auto)], 983[ 984 AC_MSG_RESULT([$enableval]) 985 if test "$enableval" = "yes" ; then 986 ENABLE_OWFS="true" 987 fi 988 if test "$enableval" = "no" ; then 989 ENABLE_OWFS="false" 990 fi 991], 992[ 993 AC_MSG_RESULT([auto (default)]) 994]) 995 996# We need fuse only if OWFS is enabled 997if test "${ENABLE_OWFS}" != "false" ; then 998 999 save_LD_EXTRALIBS="$LD_EXTRALIBS" 1000 save_CPPFLAGS="$CPPFLAGS" 1001 save_LDFLAGS="$LDFLAGS" 1002 FUSE_FLAGS="-DFUSE_USE_VERSION=26" 1003 FUSE_INCLUDES="-I${fuse_include_path}" 1004 FUSE_LIBS="-L${fuse_lib_path}" 1005 LD_EXTRALIBS="$save_LD_EXTRALIBS " 1006 CPPFLAGS="$save_CPPFLAGS -D_FILE_OFFSET_BITS=64 $FUSE_FLAGS $FUSE_INCLUDES" 1007 LDFLAGS="$save_LDFLAGS $FUSE_LIBS" 1008 1009 AC_CHECK_HEADER(fuse.h,,[ 1010 AC_MSG_WARN([ 1011 Cannot find fuse.h - Add the search path with --with-fuseinclude]) 1012 1013 FUSE_FLAGS="" 1014 FUSE_INCLUDES="" 1015 FUSE_LIBS="" 1016 LD_EXTRALIBS="$save_LD_EXTRALIBS" 1017 CPPFLAGS="$save_CPPFLAGS -D_FILE_OFFSET_BITS=64" 1018 LDFLAGS="$save_LDFLAGS" 1019 1020 AC_MSG_WARN([Install FUSE-2.2 or later to enable owfs - download it from http://fuse.sourceforge.net/]) 1021 1022 if test "${ENABLE_OWFS}" = "auto"; then 1023 AC_MSG_WARN([OWFS is disabled because fuse.h is not found.]) 1024 ENABLE_OWFS="false" 1025 else 1026 AC_MSG_ERROR([Configure without --enable-owfs to detect fuse automatically.]) 1027 fi 1028 ]) 1029 1030 if test "${ENABLE_OWFS}" != "false"; then 1031 save_CFLAGS="$CFLAGS" 1032 save_LIBS="$LIBS" 1033 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 1034 LIBS="$LIBS $PTHREAD_LIBS" 1035 AC_CHECK_LIB(fuse,fuse_main, [FUSE_LIBS="$FUSE_LIBS -lfuse"],[ 1036 AC_MSG_WARN([ 1037 Cannot find libfuse.a - add the search path with --with-fuselib]) 1038 AC_MSG_WARN([Running ldconfig or adding "/usr/local/lib" to /etc/ld.so.conf might also solve the problem, otherwise re-install fuse.]) 1039 if test "${ENABLE_OWFS}" = "auto"; then 1040 AC_MSG_WARN([OWFS is disabled because libfuse.a is not found.]) 1041 ENABLE_OWFS="false" 1042 else 1043 AC_MSG_ERROR([Cannot enable OWFS]) 1044 fi 1045 ],) 1046 CFLAGS="$save_CFLAGS" 1047 LIBS="$save_LIBS" 1048 fi 1049 1050 1051 if test "${ENABLE_OWFS}" != "false"; then 1052 # check for a supported FUSE_MAJOR_VERSION. 1053 AC_MSG_CHECKING([For supported FUSE API version]) 1054 AC_COMPILE_IFELSE([ 1055 AC_LANG_PROGRAM([[#include <fuse.h>]], 1056 [[ 1057 #ifndef FUSE_MAJOR_VERSION 1058 #error "FUSE_MAJOR_VERSION not defined" 1059 #endif 1060 ]])], 1061 [AC_MSG_RESULT([yes])], 1062 [AC_MSG_RESULT([no]) 1063 AC_MSG_WARN([OWFS is disabled since fuse.h is too old]) 1064 if test "${ENABLE_OWFS}" = "true"; then 1065 AC_MSG_ERROR([You have to install fuse first (fuse-2.2 or later recommended) - download it from http://fuse.sourceforge.net/]) 1066 else 1067 ENABLE_OWFS="false" 1068 fi 1069 ]) 1070 fi 1071 1072 1073 # Use newest FUSE API if version is newer than 2.2 1074 if test "${ENABLE_OWFS}" != "false"; then 1075 # check for a supported FUSE_MAJOR_VERSION. 1076 AC_MSG_CHECKING([For FUSE version ]) 1077 AC_COMPILE_IFELSE([ 1078 AC_LANG_PROGRAM([[#include <fuse.h>]], 1079 [[ 1080 #ifndef FUSE_VERSION 1081 #ifndef FUSE_MAJOR_VERSION 1082 #define FUSE_VERSION 11 1083 #else /* FUSE_MAJOR_VERSION */ 1084 #undef FUSE_MAKE_VERSION 1085 #define FUSE_MAKE_VERSION(maj,min) ((maj) * 10 + (min)) 1086 #define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION,FUSE_MINOR_VERSION) 1087 #endif /* FUSE_MAJOR_VERSION */ 1088 #endif /* FUSE_VERSION */ 1089 #if (FUSE_VERSION >= 22) 1090 /* Fuse > 2.2 is ok */ 1091 #else 1092 #error "Fuse < 2.2" 1093 #endif 1094 ]])], 1095 [AC_MSG_RESULT([2.2 or later]) 1096 ], 1097 [AC_MSG_RESULT([<2.2]) 1098 FUSE_FLAGS="" 1099 ]) 1100 fi 1101 1102 CPPFLAGS="$save_CPPFLAGS" 1103 LDFLAGS="$save_LDFLAGS" 1104 LD_EXTRALIBS="$save_LD_EXTRALIBS" 1105 1106 if test "${ENABLE_OWFS}" != "false"; then 1107 ENABLE_OWLIB="true" 1108 ENABLE_OWFS="true" 1109 fi 1110else 1111 ENABLE_OWFS="false" 1112fi 1113AC_SUBST(FUSE_LIBS) 1114AC_SUBST(FUSE_FLAGS) 1115AC_SUBST(FUSE_INCLUDES) 1116AC_SUBST(ENABLE_OWFS) 1117AM_CONDITIONAL(ENABLE_OWFS, test "${ENABLE_OWFS}" = "true") 1118 1119# Check if the zeroconf/bonjour is enabled. 1120AC_MSG_CHECKING(if zeroconf/bonjour is enabled) 1121ENABLE_ZERO="true" 1122AC_ARG_ENABLE(zero, 1123[ --enable-zero Enable zeroconf/bonjour (default true)], 1124[ 1125 AC_MSG_RESULT([$enableval]) 1126 1127 if test ! "$enableval" = "yes" ; then 1128 ENABLE_ZERO=false 1129 fi 1130], 1131[ 1132 AC_MSG_RESULT([yes (default)]) 1133]) 1134AC_SUBST(ENABLE_ZERO) 1135AM_CONDITIONAL(ENABLE_ZERO, test "${ENABLE_ZERO}" = "true") 1136 1137 1138LIBUSB_CFLAGS="" 1139LIBUSB_LIBS="" 1140 1141 1142# Check for USB enabled 1143ENABLE_USB=auto 1144AC_MSG_CHECKING([if usb support is enabled]) 1145 1146AC_ARG_ENABLE(usb, 1147[ --enable-usb Enable 1-Wire usb DS2490 support (default auto)], 1148[ 1149 AC_MSG_RESULT([$enableval]) 1150 1151 if ! test "$enableval" = "yes" ; then 1152 ENABLE_USB=false 1153 fi 1154], 1155[ 1156 AC_MSG_RESULT([auto (default)]) 1157]) 1158 1159if test "${ENABLE_USB}" != "false"; then 1160 #LIBUSB_CONFIG 1161 PKG_CHECK_MODULES([LIBUSB], [libusb-1.0 >= 0.9.1], [ENABLE_USB=true],[ENABLE_USB=false]) 1162fi 1163 1164AC_SUBST(LIBUSB_CFLAGS) 1165AC_SUBST(LIBUSB_LIBS) 1166AC_SUBST(ENABLE_USB) 1167AM_CONDITIONAL(ENABLE_USB, test "${ENABLE_USB}" = "true") 1168 1169AM_CPPFLAGS="$AM_CPPFLAGS $LIBUSB_CFLAGS" 1170 1171# Check for Avahi enabled 1172ENABLE_AVAHI=auto 1173AC_MSG_CHECKING([if Avahi support is enabled]) 1174 1175AC_ARG_ENABLE(avahi, 1176[ --enable-avahi Enable zero-config autodiscovery (default auto)], 1177[ 1178 AC_MSG_RESULT([$enableval]) 1179 1180 if ! test "$enableval" = "yes" ; then 1181 ENABLE_AVAHI=false 1182 fi 1183], 1184[ 1185 AC_MSG_RESULT([auto (default)]) 1186]) 1187 1188if test "${ENABLE_AVAHI}" != "false"; then 1189 1190 # Include libavahi if the avahi is enabled 1191 if test "X${LIBAVAHI_CONFIG}" != "X" ; then 1192 1193 LIBAVAHI_CFLAGS=`$LIBAVAHI_CONFIG --cflags` 1194 LIBAVAHI_LIBS=`$LIBAVAHI_CONFIG --libs` 1195 1196 save_CPPFLAGS="$CPPFLAGS" 1197 save_LDFLAGS="$LDFLAGS" 1198 CPPFLAGS="$save_CPPFLAGS $LIBAVAHI_CFLAGS" 1199 LDFLAGS="$save_LDFLAGS $LIBAVAHI_LIBS" 1200 1201 AC_MSG_CHECKING([if libavahi compiles with includes+lib ]) 1202 AC_COMPILE_IFELSE([ 1203 AC_LANG_PROGRAM([[#include <avahi-chient/client.h>]], 1204 [[ 1205 avahi_client_new(NULL,0,NULL); 1206 ]])], 1207 [AC_MSG_RESULT([ok])], 1208 [AC_MSG_RESULT([compilation error]) 1209 LIBAVAHI_CFLAGS="" 1210 LIBAVAHI_LDFLAGS="" 1211 LIBAVAHI_CONFIG="" 1212 ]) 1213 1214 CPPFLAGS="$save_CPPFLAGS" 1215 LDFLAGS="$save_LDFLAGS" 1216 1217 #LIBAVAHI_CONFIG 1218 fi 1219 1220 # ultimate test to see if libavahi is found after AC_CHECK_LIB 1221 if test "X${LIBAVAHI_CONFIG}" == "X"; then 1222 1223 PKG_CHECK_MODULES([LIBAVAHI], [avahi-client], [ dnl ok, avahi found with pkg-config 1224 ],[ dnl else trying basic detection 1225 AC_CHECK_LIB(avahi-common,avahi_threaded_poll_new,[ 1226 AC_CHECK_LIB(avahi-client,avahi_client_new,[ 1227 LIBAVAHI_LIBS="-lavahi-client -lavahi-common"],[ 1228 AC_MSG_WARN([Cannot find libavahi-client]) 1229 if test "${ENABLE_AVAHI}" = "true" ; then 1230 AC_MSG_ERROR([libavahi must be installed to use a Avahi zero-configuration]) 1231 else 1232 AC_MSG_WARN([libavahi not found, avahi will be disabled]) 1233 ENABLE_AVAHI=false 1234 fi 1235 ],)],[ 1236 AC_MSG_WARN([Cannot find libavahi-common]) 1237 if test "${ENABLE_AVAHI}" = "true" ; then 1238 AC_MSG_ERROR([libavahi must be installed to use a Avahi zero-configuration]) 1239 else 1240 AC_MSG_WARN([libavahi not found, avahi will be disabled]) 1241 ENABLE_AVAHI=false 1242 fi 1243 ],) 1244 ]) 1245 1246 fi 1247 1248 if test "${ENABLE_AVAHI}" != "false" ; then 1249 ENABLE_AVAHI=true 1250 fi 1251 1252 # ENABLE_AVAHI 1253fi 1254 1255AC_SUBST(LIBAVAHI_CFLAGS) 1256AC_SUBST(LIBAVAHI_LIBS) 1257AC_SUBST(ENABLE_AVAHI) 1258AM_CONDITIONAL(ENABLE_AVAHI, test "${ENABLE_AVAHI}" = "true") 1259 1260# Check for Parallel port enabled 1261ENABLE_PARPORT=auto 1262AC_MSG_CHECKING([if parallel port support is enabled]) 1263 1264AC_ARG_ENABLE(parport, 1265[ --enable-parport Enable 1-Wire parallel port DS1410E support (default auto)], 1266[ 1267 AC_MSG_RESULT([$enableval]) 1268 1269 if ! test "$enableval" = "yes" ; then 1270 ENABLE_PARPORT=false 1271 fi 1272], 1273[ 1274 AC_MSG_RESULT([yes (default)]) 1275]) 1276 1277# Include linux/ppdev.h if the parallel port is enabled 1278if test "${ENABLE_PARPORT}" != "false" ; then 1279 1280 AC_CHECK_HEADER(linux/ppdev.h,,[ 1281 if test "${ENABLE_PARPORT}" = "true" ; then 1282 AC_MSG_ERROR([ppdev.h must be installed to use parallel port adapter]) 1283 else 1284 AC_MSG_WARN([ppdev.h not found, parallel port will be disabled]) 1285 ENABLE_PARPORT=false 1286 fi 1287 ]) 1288 if test "${ENABLE_PARPORT}" != "false" ; then 1289 ENABLE_PARPORT=true 1290 fi 1291fi 1292 1293AC_SUBST(ENABLE_PARPORT) 1294AM_CONDITIONAL(ENABLE_PARPORT, test "${ENABLE_PARPORT}" = "true") 1295 1296 1297dnl We support both libftdi 1.x and libftdi 0.x 1298if test "$cross_compiling" != yes; then 1299AC_CHECK_PROGS(LIBFTDI_CONFIG, libftdi1-config libftdi-config) 1300else 1301LIBFTDI_CONFIG="" 1302fi 1303AC_SUBST(LIBFTDI_CONFIG) 1304 1305AC_ARG_WITH(libftdi-config, 1306 [ --with-libftdi-config=PATH Specify full path to libftdi-config or libftdi1-config]) 1307dnl Check if user passed a specific libftdi-config program. 1308if test "X$with_libftdi_config" != "X" ; then 1309 LIBFTDI_CONFIG=$with_libftdi_config 1310fi 1311 1312if test "$cross_compiling" != yes; then 1313 if test "X$LIBFTDI_CONFIG" == "X" ; then 1314 dirs="/usr/bin /usr/local/bin /opt/local/bin" 1315 for i in $dirs; do 1316 for prog in libftdi1-config libftdi-config; do 1317 echo "Testing $i/$prog" 1318 if test -x $i/$prog; then 1319 AC_MSG_RESULT($i/$prog is found) 1320 LIBFTDI_CONFIG="$i/$prog" 1321 break 2; 1322 fi 1323 done 1324 done 1325 fi 1326fi 1327 1328# Check if FTDI should be enabled 1329ENABLE_FTDI=auto 1330AC_MSG_CHECKING([if libftdi is available]) 1331 1332AC_ARG_ENABLE(ftdi, 1333[ --enable-ftdi Enable LinkUSB support via libftdi (default auto)], 1334[ 1335 AC_MSG_RESULT([$enableval]) 1336 1337 if ! test "$enableval" = "yes" ; then 1338 ENABLE_FTDI=false 1339 fi 1340], 1341[ 1342 AC_MSG_RESULT([auto (default)]) 1343]) 1344 1345# Include ftdi.h if enabled 1346if test "${ENABLE_FTDI}" != "false" ; then 1347 1348 LIBFTDI_FOUND=false 1349 if test "X${LIBFTDI_CONFIG}" != "X" ; then 1350 LIBFTDI_CFLAGS=`$LIBFTDI_CONFIG --cflags` 1351 LIBFTDI_LIBS=`$LIBFTDI_CONFIG --libs` 1352 1353 save_CPPFLAGS="$CPPFLAGS" 1354 save_LDFLAGS="$LDFLAGS" 1355 CPPFLAGS="$save_CPPFLAGS $LIBFTDI_CFLAGS" 1356 LDFLAGS="$save_LDFLAGS $LIBFTDI_LIBS" 1357 1358 AC_MSG_CHECKING([if libftdi compiles with includes+lib ]) 1359 AC_COMPILE_IFELSE([ 1360 AC_LANG_PROGRAM([[#include <ftdi.h>]], 1361 [[ 1362 struct ftdi_context ftdic; 1363 ftdi_init(&ftdic); 1364 ]])], 1365 [AC_MSG_RESULT([ok]) 1366 FTDI_FOUND=true 1367 ], 1368 [AC_MSG_RESULT([compilation error]) 1369 LIBFTDI_CFLAGS="" 1370 LIBFTDI_LDFLAGS="" 1371 LIBFTDI_CONFIG="" 1372 ]) 1373 1374 CPPFLAGS="$save_CPPFLAGS" 1375 LDFLAGS="$save_LDFLAGS" 1376 fi 1377 1378 if test "${FTDI_FOUND}" = "true"; then 1379 ENABLE_FTDI=true 1380 else 1381 if test "${ENABLE_FTDI}" = "true" ; then 1382 AC_MSG_ERROR([libftdi must be installed to use LinkUSB natively]) 1383 else 1384 AC_MSG_WARN([libftdi not found, LinkUSB native will be disabled]) 1385 ENABLE_FTDI=false 1386 fi 1387 fi 1388fi 1389AC_SUBST(LIBFTDI_CFLAGS) 1390AC_SUBST(LIBFTDI_LIBS) 1391AC_SUBST(ENABLE_FTDI) 1392AM_CONDITIONAL(ENABLE_FTDI, test "${ENABLE_FTDI}" = "true") 1393 1394if test "${HAVE_CYGWIN}" = "true" ; then 1395 OW_CYGWIN=1 1396else 1397 OW_CYGWIN=0 1398fi 1399AC_SUBST(OW_CYGWIN) 1400 1401if test "${HAVE_DARWIN}" = "true" ; then 1402 OW_DARWIN=1 1403else 1404 OW_DARWIN=0 1405fi 1406AC_SUBST(OW_DARWIN) 1407 1408 1409AC_CHECK_TYPES([struct sockaddr_storage], , , 1410[[ 1411 #ifdef HAVE_SYS_TYPES_H 1412 #include <sys/types.h> 1413 #endif 1414 #ifdef HAVE_SYS_SOCKET_H 1415 #include <sys/socket.h> 1416 #endif 1417 #ifdef HAVE_NETINET_IN_H 1418 #include <netinet/in.h> 1419 #endif 1420 #ifdef HAVE_ARPA_INET_H 1421 #include <arpa/inet.h> 1422 #endif 1423]] 1424) 1425 1426if test "$ac_cv_type_struct_sockaddr_storage" = no; then 1427 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 1428 [AC_DEFINE(SOCKADDR_IN_HAS_LEN, 1, [Define to 1 if sockaddr_in has a 'sin_len' member.])]) 1429fi 1430AC_CHECK_TYPES([struct addrinfo], , , [[#include <netdb.h>]]) 1431AC_CHECK_TYPE(socklen_t, , 1432[AC_DEFINE([socklen_t], [unsigned int], 1433[If we do not have a real socklen_t, unsigned int is good enough.])], 1434[ 1435 #ifdef HAVE_SYS_TYPES_H 1436 #include <sys/types.h> 1437 #endif 1438 #ifdef HAVE_SYS_SOCKET_H 1439 #include <sys/socket.h> 1440 #endif 1441]) 1442 1443 1444AC_MSG_CHECKING(for AF_NETLINK) 1445AC_COMPILE_IFELSE( 1446[AC_LANG_PROGRAM( 1447[ 1448 #ifdef HAVE_SYS_TYPES_H 1449 #include <sys/types.h> 1450 #endif 1451 #ifdef HAVE_SYS_SOCKET_H 1452 #include <sys/socket.h> 1453 #endif 1454], 1455[int ss_family = AF_NETLINK;])], 1456[ 1457 AC_MSG_RESULT(yes) 1458 have_af_netlink="yes" 1459 AC_DEFINE(HAVE_AF_NETLINK, 1, [Have AF_NETLINK in socket.h]) 1460], 1461[AC_MSG_RESULT(no) 1462have_af_netlink="no"]) 1463 1464if test "${have_af_netlink}" != "yes" ; then 1465 if test "${ENABLE_W1}" != "false" ; then 1466 AC_MSG_WARN([Disable w1 since AF_NETLINK not found]) 1467 ENABLE_W1="false" 1468 fi 1469fi 1470 1471 1472AC_MSG_CHECKING(for broken glibc with __ss_family) 1473AC_COMPILE_IFELSE( 1474[AC_LANG_PROGRAM( 1475[ 1476 #ifdef HAVE_SYS_TYPES_H 1477 #include <sys/types.h> 1478 #endif 1479 #ifdef HAVE_SYS_SOCKET_H 1480 #include <sys/socket.h> 1481 #endif 1482], 1483[struct sockaddr_storage s; s.__ss_family = AF_INET;])], 1484[ 1485 AC_MSG_RESULT(yes) 1486 AC_DEFINE(HAVE_BROKEN_SS_FAMILY, 1, [Broken glibc implementations use __ss_family instead of ss_family.]) 1487], 1488[AC_MSG_RESULT(no)]) 1489 1490 1491AC_MSG_CHECKING([for core ipv6 support]) 1492AC_COMPILE_IFELSE( 1493[AC_LANG_PROGRAM( 1494 [[#define IN_AUTOCONF 1495 #include "include/stdinc.h"]], 1496 [[struct sockaddr_in6 s; 1497 struct sockaddr_storage t; 1498 s.sin6_family = 0;]] 1499 )], 1500[ 1501 if test "${HAVE_CYGWIN}" = "true" ; then 1502 AC_MSG_RESULT([no, Cygwins ipv6 is incomplete]) 1503 AC_DEFINE(__HAS_IPV6__, 0, [No ipv6 support available.]) 1504 have_v6=no 1505 else 1506 have_v6=yes 1507 AC_DEFINE(IPV6, 1, [Define if ipv6 support is present and available.]) 1508 AC_DEFINE(__HAS_IPV6__, 1, [Define if ipv6 support is present and available.]) 1509 AC_MSG_RESULT(yes) 1510 AC_MSG_CHECKING([for struct in6addr_any]) 1511 AC_COMPILE_IFELSE( 1512 [AC_LANG_PROGRAM( 1513 [[#define IN_AUTOCONF 1514 #include "include/stdinc.h"]], 1515 [[struct in6_addr a = in6addr_any;]] 1516 )], 1517 [AC_MSG_RESULT(yes)], 1518 [ 1519 AC_MSG_RESULT(no) 1520 AC_DEFINE(NO_IN6ADDR_ANY, 1, [Define to 1 if your system has no in6addr_any.]) 1521 inet_misc=1 1522 ] 1523 ) 1524 fi 1525], 1526[ 1527 AC_MSG_RESULT(no) 1528 have_v6=no 1529 AC_DEFINE(__HAS_IPV6__, 0, [No ipv6 support available.]) 1530]) 1531 1532# Test if uthash is enabled 1533AC_MSG_CHECKING(if uthash is enabled) 1534ENABLE_UTHASH="auto" 1535AC_ARG_ENABLE(uthash, 1536[ --enable-uthash Enable uthash (default auto)], 1537[ 1538 if test "$enableval" = "no"; then 1539 ENABLE_UTHASH="false" 1540 AC_MSG_RESULT([no]) 1541 else 1542 ENABLE_UTHASH="true" 1543 AC_MSG_RESULT([yes]) 1544 fi 1545], 1546[ 1547 AC_MSG_RESULT([auto (default)]) 1548]) 1549if test "${ENABLE_UTHASH}" != "false" ; then 1550 AC_CHECK_HEADER(uthash.h,,[ 1551 if test "${ENABLE_UTHASH}" = "true" ; then 1552 AC_MSG_ERROR([uthash.h must be installed]) 1553 else 1554 AC_MSG_WARN([uthash.h not found, hash optimisations will be disabled]) 1555 ENABLE_UTHASH=false 1556 fi 1557 ]) 1558 if test "${ENABLE_UTHASH}" != "false" ; then 1559 ENABLE_UTHASH=true 1560 fi 1561fi 1562 1563 1564AC_CACHE_CHECK(if sem_timedwait exists,ac_cv_sem_timedwait, [ 1565 save_LIBS="$LIBS"; LIBS="$LIBS $PTHREAD_LIBS" ; save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 1566AC_TRY_LINK([ 1567#if HAVE_STDLIB_H 1568#include <stdlib.h> 1569#endif 1570#if HAVE_SEMAPHORE_H 1571#include <semaphore.h> 1572#endif 1573], 1574 [sem_timedwait(NULL, NULL)],[ 1575 ac_cv_sem_timedwait="yes"],[ 1576 AC_MSG_WARN([Cannot find sem_timedwait]) 1577 ac_cv_sem_timedwait="no" 1578]) 1579LIBS="$save_LIBS" 1580CFLAGS="$save_CFLAGS" 1581]) 1582 1583if test "$ac_cv_sem_timedwait" = "yes"; then 1584 AC_DEFINE(HAVE_SEM_TIMEDWAIT, 1, [Define to 1 if you have the sem_timedwait function.]) 1585fi 1586 1587 1588AC_CACHE_CHECK([whether string.h and strings.h may both be included], 1589gcc_cv_header_string, 1590[ 1591 AC_COMPILE_IFELSE( 1592 [AC_LANG_SOURCE( 1593 [[#include <string.h> 1594 #include <strings.h>]] 1595 )], 1596 [gcc_cv_header_string=yes], 1597 [gcc_cv_header_string=no] 1598 ) 1599]) 1600 1601if test "$gcc_cv_header_string" = "yes"; then 1602 AC_DEFINE(STRING_WITH_STRINGS, 1, [Define to 1 if string.h may be included along with strings.h]) 1603fi 1604 1605if test "${ENABLE_I2C}" = "true" ; then 1606 OW_I2C=1 1607else 1608 OW_I2C=0 1609fi 1610AC_SUBST(OW_I2C) 1611 1612if test "${ENABLE_W1}" = "true" ; then 1613 OW_W1=1 1614else 1615 OW_W1=0 1616fi 1617AC_SUBST(OW_W1) 1618 1619if test "${ENABLE_USB}" = "true" ; then 1620 OW_USB=1 1621else 1622 OW_USB=0 1623fi 1624AC_SUBST(OW_USB) 1625 1626if test "${ENABLE_AVAHI}" = "true" ; then 1627 OW_AVAHI=1 1628else 1629 OW_AVAHI=0 1630fi 1631AC_SUBST(OW_AVAHI) 1632 1633if test "${ENABLE_ZERO}" = "true" ; then 1634 OW_ZERO=1 1635else 1636 OW_ZERO=0 1637fi 1638AC_SUBST(OW_ZERO) 1639 1640if test "${ENABLE_PARPORT}" = "true" ; then 1641 OW_PARPORT=1 1642else 1643 OW_PARPORT=0 1644fi 1645AC_SUBST(OW_PARPORT) 1646 1647if test "${ENABLE_FTDI}" = "true" ; then 1648 OW_FTDI=1 1649else 1650 OW_FTDI=0 1651fi 1652AC_SUBST(OW_FTDI) 1653 1654if test "${ENABLE_UTHASH}" = "true" ; then 1655 OW_UTHASH=1 1656else 1657 OW_UTHASH=0 1658fi 1659AC_SUBST(OW_UTHASH) 1660 1661if test "${ENABLE_DEBUG}" = "true" ; then 1662 OW_DEBUG=1 1663else 1664 OW_DEBUG=0 1665fi 1666AC_SUBST(OW_DEBUG) 1667 1668if test "${ENABLE_MUTEX_DEBUG}" = "true" ; then 1669 OW_MUTEX_DEBUG=1 1670else 1671 OW_MUTEX_DEBUG=0 1672fi 1673AC_SUBST(OW_MUTEX_DEBUG) 1674 1675if test "${ENABLE_OWMALLOC}" = "true" ; then 1676 OW_ALLOC_DEBUG=1 1677else 1678 OW_ALLOC_DEBUG=0 1679fi 1680AC_SUBST(OW_ALLOC_DEBUG) 1681 1682# Checks for typedefs, structures, and compiler characteristics. 1683 1684AC_C_CONST 1685AC_TYPE_OFF_T 1686AC_TYPE_PID_T 1687AC_TYPE_SIZE_T 1688AC_HEADER_TIME 1689AC_HEADER_STDBOOL 1690AC_STRUCT_TM 1691 1692# Checks for library functions. 1693AC_FUNC_FORK 1694#AC_FUNC_MALLOC 1695#AC_FUNC_MKTIME 1696#AC_FUNC_REALLOC 1697AC_FUNC_SELECT_ARGTYPES 1698AC_FUNC_STRFTIME 1699AC_FUNC_STRTOD 1700AC_TYPE_SIGNAL 1701AC_CHECK_FUNCS([accept daemon getaddrinfo freeaddrinfo gethostbyname2_r gethostbyaddr_r gethostbyname_r getservbyname_r getopt getopt_long gmtime_r gettimeofday localtime_r inet_ntop inet_pton memchr memset select socket strcasecmp strchr strdup strncasecmp strtol strtoul twalk tsearch tfind tdelete tdestroy vasprintf strsep vsprintf vsnprintf writev getline]) 1702 1703save_LIBS="$LIBS" 1704LIBS="" 1705DL_LIBS="" 1706if test "${ENABLE_ZERO}" = "true" ; then 1707 AC_SEARCH_LIBS(dlopen, dl, 1708 AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])) 1709 DL_LIBS="$LIBS" 1710fi 1711AC_SUBST([DL_LIBS]) 1712LIBS="$save_LIBS" 1713 1714save_LIBS="$LIBS" 1715M_LIBS="" 1716LIBS="" 1717AC_SEARCH_LIBS(lrint, m, 1718 AC_DEFINE(HAVE_LRINT, 1, [Define if you have lrint])) 1719M_LIBS="$LIBS" 1720AC_SUBST([M_LIBS]) 1721LIBS="$save_LIBS" 1722 1723AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep])) 1724# clock_gettime needed if real-time wait is needed for sem_timedwait. gettimeofday is enough. 1725#AC_SEARCH_LIBS(clock_gettime, rt posix4, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime])) 1726 1727# systemd support (see man 7 daemon) 1728AC_ARG_WITH([systemdsystemunitdir], 1729 [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, 1730 [with_systemdsystemunitdir=auto]) 1731AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ 1732 def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) 1733 1734AS_IF([test "x$def_systemdsystemunitdir" = "x"], 1735 [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], 1736 [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) 1737 with_systemdsystemunitdir=no], 1738 [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) 1739AS_IF([test "x$with_systemdsystemunitdir" != "xno"], 1740 [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) 1741AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) 1742save_LIBS="$LIBS" 1743MQ_LIBS="" 1744LIBS="" 1745AC_SEARCH_LIBS([mq_getattr], [rt]) 1746MQ_LIBS="$LIBS" 1747AC_SUBST([MQ_LIBS]) 1748LIBS="$save_LIBS" 1749 1750HAVE_CHECK="false" 1751PKG_CHECK_MODULES([libcheck],[check >= 0.10.0],[HAVE_CHECK="true"], 1752 AC_MSG_WARN(["Check unit testing framework not found. "])) 1753AM_CONDITIONAL(HAVE_CHECK, test "${HAVE_CHECK}" = "true") 1754CHECK_CFLAGS="$libcheck_CFLAGS" 1755CHECK_LIBS="$libcheck_LIBS" 1756AC_SUBST([CHECK_CFLAGS]) 1757AC_SUBST([CHECK_LIBS]) 1758 1759 1760AC_CONFIG_FILES([ 1761 Makefile 1762 module/Makefile 1763 1764 module/owlib/Makefile 1765 module/owlib/src/Makefile 1766 module/owlib/src/include/Makefile 1767 module/owlib/src/c/Makefile 1768 module/owlib/tests/Makefile 1769 1770 module/owfs/Makefile 1771 module/owfs/src/Makefile 1772 module/owfs/src/include/Makefile 1773 module/owfs/src/c/Makefile 1774 1775 module/owhttpd/Makefile 1776 module/owhttpd/src/Makefile 1777 module/owhttpd/src/include/Makefile 1778 module/owhttpd/src/c/Makefile 1779 1780 module/owserver/Makefile 1781 module/owserver/src/Makefile 1782 module/owserver/src/include/Makefile 1783 module/owserver/src/c/Makefile 1784 1785 module/owftpd/Makefile 1786 module/owftpd/src/Makefile 1787 module/owftpd/src/include/Makefile 1788 module/owftpd/src/c/Makefile 1789 1790 module/ownet/Makefile 1791 module/ownet/php/Makefile 1792 module/ownet/php/examples/ownet_example.php 1793 module/ownet/python/Makefile 1794 module/ownet/perl5/Makefile 1795 module/ownet/c/Makefile 1796 module/ownet/c/src/Makefile 1797 module/ownet/c/src/include/Makefile 1798 module/ownet/c/src/c/Makefile 1799 module/ownet/c/src/example/Makefile 1800 1801 module/owshell/Makefile 1802 module/owshell/src/Makefile 1803 module/owshell/src/include/Makefile 1804 module/owshell/src/c/Makefile 1805 1806 module/owcapi/Makefile 1807 module/owcapi/src/Makefile 1808 module/owcapi/src/include/Makefile 1809 module/owcapi/src/c/Makefile 1810 module/owcapi/src/example/Makefile 1811 module/owcapi/src/example++/Makefile 1812 module/owcapi/owcapi.pc 1813 1814 module/owtap/Makefile 1815 1816 module/owmon/Makefile 1817 1818 module/swig/Makefile 1819 module/swig/perl5/Makefile 1820 module/swig/perl5/OW/Makefile.linux 1821 module/swig/perl5/OW/Makefile.osx 1822 module/swig/php/Makefile 1823 module/swig/php/example/load_php_OW.php 1824 module/swig/python/Makefile 1825 module/swig/python/ow/Makefile 1826 module/swig/python/setup.py 1827 1828 module/owtcl/Makefile 1829 1830 src/Makefile 1831 src/include/Makefile 1832 1833 src/man/Makefile 1834 src/man/man1/Makefile 1835 src/man/man3/Makefile 1836 src/man/man5/Makefile 1837 src/man/mann/Makefile 1838 1839 src/rpm/Makefile 1840 src/rpm/owfs.spec 1841 src/scripts/Makefile 1842 src/scripts/windows/Makefile 1843 src/scripts/windows/owfs.nsi 1844 src/scripts/usb/Makefile 1845 src/scripts/usb/cygwin/Makefile 1846 src/scripts/usb/windows/Makefile 1847 src/scripts/systemd/Makefile 1848 src/include/owfs_config.h 1849]) 1850AC_OUTPUT 1851 1852# Now, let's tell them what is the current configuration. Only the items 1853# that are funny (like current default prefix) or configurable (like the 1854# cache) should be included. 1855 1856AC_MSG_RESULT() 1857AC_MSG_RESULT([Current configuration:]) 1858AC_MSG_RESULT() 1859 1860AC_MSG_RESULT([ Deployment location: ${prefix}]) 1861 1862AC_MSG_RESULT() 1863AC_MSG_RESULT([Compile-time options:]) 1864 1865if test "${ENABLE_USB}" = "true"; then 1866 AC_MSG_RESULT([ USB is enabled]) 1867else 1868 AC_MSG_RESULT([ USB is DISABLED]) 1869fi 1870if test "${ENABLE_AVAHI}" = "true"; then 1871 AC_MSG_RESULT([ AVAHI is enabled]) 1872else 1873 AC_MSG_RESULT([ AVAHI is DISABLED]) 1874fi 1875if test "${ENABLE_I2C}" = "true"; then 1876 AC_MSG_RESULT([ I2C is enabled]) 1877else 1878 AC_MSG_RESULT([ I2C is DISABLED]) 1879fi 1880if test "${ENABLE_W1}" = "true"; then 1881 AC_MSG_RESULT([ W1 is enabled]) 1882else 1883 AC_MSG_RESULT([ W1 is DISABLED]) 1884fi 1885if test "${ENABLE_PARPORT}" = "true"; then 1886 AC_MSG_RESULT([ Parallel port DS1410E is enabled]) 1887else 1888 AC_MSG_RESULT([ Parallel port DS1410E is DISABLED]) 1889fi 1890if test "${ENABLE_FTDI}" = "true"; then 1891 AC_MSG_RESULT([ FTDI (LinkUSB) is enabled]) 1892else 1893 AC_MSG_RESULT([ FTDI (LinkUSB) is DISABLED]) 1894fi 1895if test "${ENABLE_ZERO}" = "true"; then 1896 AC_MSG_RESULT([ Zeroconf/Bonjour is enabled]) 1897else 1898 AC_MSG_RESULT([ Zeroconf/Bonjour is DISABLED]) 1899fi 1900if test "${ENABLE_UTHASH}" = "true"; then 1901 AC_MSG_RESULT([ uthash is enabled]) 1902else 1903 AC_MSG_RESULT([ uthash is DISABLED]) 1904fi 1905if test "${ENABLE_DEBUG}" = "true"; then 1906 AC_MSG_RESULT([ Debug-output is enabled]) 1907else 1908 AC_MSG_RESULT([ Debug-output is DISABLED]) 1909fi 1910if test "${ENABLE_MUTEX_DEBUG}" = "true"; then 1911 AC_MSG_RESULT([ Mutexdebug is enabled]) 1912else 1913 AC_MSG_RESULT([ Mutexdebug is DISABLED]) 1914fi 1915if test "${ENABLE_PROFILING}" = "true"; then 1916 AC_MSG_RESULT([ Profiling is enabled]) 1917else 1918 AC_MSG_RESULT([ Profiling is DISABLED]) 1919fi 1920if test "${ENABLE_OWMALLOC}" = "true"; then 1921 AC_MSG_RESULT([Tracing memory allocation is enabled]) 1922else 1923 AC_MSG_RESULT([Tracing memory allocation is DISABLED]) 1924fi 1925 1926 1927AC_MSG_RESULT() 1928AC_MSG_RESULT([Module configuration:]) 1929 1930if test "${ENABLE_OWLIB}" = "true"; then 1931 AC_MSG_RESULT([ owlib is enabled]) 1932else 1933 AC_MSG_RESULT([ owlib is DISABLED]) 1934fi 1935if test "${ENABLE_OWSHELL}" = "true"; then 1936 AC_MSG_RESULT([ owshell is enabled]) 1937else 1938 AC_MSG_RESULT([ owshell is DISABLED]) 1939fi 1940if test "${ENABLE_OWFS}" = "true"; then 1941 AC_MSG_RESULT([ owfs is enabled]) 1942else 1943 AC_MSG_RESULT([ owfs is DISABLED]) 1944fi 1945if test "${ENABLE_OWHTTPD}" = "true"; then 1946 AC_MSG_RESULT([ owhttpd is enabled]) 1947else 1948 AC_MSG_RESULT([ owhttpd is DISABLED]) 1949fi 1950if test "${ENABLE_OWFTPD}" = "true"; then 1951 AC_MSG_RESULT([ owftpd is enabled]) 1952else 1953 AC_MSG_RESULT([ owftpd is DISABLED]) 1954fi 1955if test "${ENABLE_OWSERVER}" = "true"; then 1956 AC_MSG_RESULT([ owserver is enabled]) 1957else 1958 AC_MSG_RESULT([ owserver is DISABLED]) 1959fi 1960if test "${ENABLE_OWEXTERNAL}" = "true"; then 1961 AC_MSG_RESULT([ owexternal is enabled]) 1962else 1963 AC_MSG_RESULT([ owexternal is DISABLED]) 1964fi 1965if test "${ENABLE_OWNET}" = "true"; then 1966 AC_MSG_RESULT([ ownet is enabled]) 1967else 1968 AC_MSG_RESULT([ ownet is DISABLED]) 1969fi 1970if test "${ENABLE_OWNETLIB}" = "true"; then 1971 AC_MSG_RESULT([ ownetlib is enabled]) 1972else 1973 AC_MSG_RESULT([ ownetlib is DISABLED]) 1974fi 1975if test "${ENABLE_OWTAP}" = "true"; then 1976 AC_MSG_RESULT([ owtap is enabled]) 1977else 1978 AC_MSG_RESULT([ owtap is DISABLED]) 1979fi 1980if test "${ENABLE_OWMON}" = "true"; then 1981 AC_MSG_RESULT([ owmon is enabled]) 1982else 1983 AC_MSG_RESULT([ owmon is DISABLED]) 1984fi 1985if test "${ENABLE_OWCAPI}" = "true"; then 1986 AC_MSG_RESULT([ owcapi is enabled]) 1987else 1988 AC_MSG_RESULT([ owcapi is DISABLED]) 1989fi 1990if test "${ENABLE_SWIG}" = "true"; then 1991 AC_MSG_RESULT([ swig is enabled]) 1992else 1993 AC_MSG_RESULT([ swig is DISABLED]) 1994fi 1995if test "${ENABLE_OWPERL}" = "true" -a "${ENABLE_SWIG}" = "true"; then 1996 AC_MSG_RESULT([ owperl is enabled]) 1997else 1998 AC_MSG_RESULT([ owperl is DISABLED]) 1999fi 2000if test "${ENABLE_OWPHP}" = "true" -a "${ENABLE_SWIG}" = "true"; then 2001 AC_MSG_RESULT([ owphp is enabled]) 2002else 2003 AC_MSG_RESULT([ owphp is DISABLED]) 2004fi 2005if test "${ENABLE_OWPYTHON}" = "true" -a "${ENABLE_SWIG}" = "true"; then 2006 AC_MSG_RESULT([ owpython is enabled]) 2007else 2008 AC_MSG_RESULT([ owpython is DISABLED]) 2009fi 2010if test "${ENABLE_OWTCL}" = "true"; then 2011 AC_MSG_RESULT([ owtcl is enabled]) 2012else 2013 AC_MSG_RESULT([ owtcl is DISABLED]) 2014fi 2015 2016AC_MSG_RESULT() 2017if test "${HAVE_CHECK}" = "true"; then 2018 AC_MSG_RESULT([ unit tests are enabled (run with 'make check')]) 2019else 2020 AC_MSG_RESULT([ unit tests are DISABLED]) 2021fi 2022AC_MSG_RESULT() 2023