1477 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1513 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1478 as_fn_set_status $ac_retval |
1514 as_fn_set_status $ac_retval |
1479 |
1515 |
1480 } # ac_fn_c_try_cpp |
1516 } # ac_fn_c_try_cpp |
1481 |
1517 |
|
1518 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
|
1519 # ------------------------------------------------------- |
|
1520 # Tests whether HEADER exists, giving a warning if it cannot be compiled using |
|
1521 # the include files in INCLUDES and setting the cache variable VAR |
|
1522 # accordingly. |
|
1523 ac_fn_c_check_header_mongrel () |
|
1524 { |
|
1525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
|
1526 if eval \${$3+:} false; then : |
|
1527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
|
1528 $as_echo_n "checking for $2... " >&6; } |
|
1529 if eval \${$3+:} false; then : |
|
1530 $as_echo_n "(cached) " >&6 |
|
1531 fi |
|
1532 eval ac_res=\$$3 |
|
1533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
|
1534 $as_echo "$ac_res" >&6; } |
|
1535 else |
|
1536 # Is the header compilable? |
|
1537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
|
1538 $as_echo_n "checking $2 usability... " >&6; } |
|
1539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
1540 /* end confdefs.h. */ |
|
1541 $4 |
|
1542 #include <$2> |
|
1543 _ACEOF |
|
1544 if ac_fn_c_try_compile "$LINENO"; then : |
|
1545 ac_header_compiler=yes |
|
1546 else |
|
1547 ac_header_compiler=no |
|
1548 fi |
|
1549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
1550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
|
1551 $as_echo "$ac_header_compiler" >&6; } |
|
1552 |
|
1553 # Is the header present? |
|
1554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
|
1555 $as_echo_n "checking $2 presence... " >&6; } |
|
1556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
1557 /* end confdefs.h. */ |
|
1558 #include <$2> |
|
1559 _ACEOF |
|
1560 if ac_fn_c_try_cpp "$LINENO"; then : |
|
1561 ac_header_preproc=yes |
|
1562 else |
|
1563 ac_header_preproc=no |
|
1564 fi |
|
1565 rm -f conftest.err conftest.i conftest.$ac_ext |
|
1566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
|
1567 $as_echo "$ac_header_preproc" >&6; } |
|
1568 |
|
1569 # So? What about this header? |
|
1570 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
|
1571 yes:no: ) |
|
1572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
|
1573 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
|
1574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
|
1575 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
|
1576 ;; |
|
1577 no:yes:* ) |
|
1578 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
|
1579 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
|
1580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
|
1581 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
|
1582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
|
1583 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
|
1584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
|
1585 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
|
1586 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
|
1587 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
|
1588 ;; |
|
1589 esac |
|
1590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
|
1591 $as_echo_n "checking for $2... " >&6; } |
|
1592 if eval \${$3+:} false; then : |
|
1593 $as_echo_n "(cached) " >&6 |
|
1594 else |
|
1595 eval "$3=\$ac_header_compiler" |
|
1596 fi |
|
1597 eval ac_res=\$$3 |
|
1598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
|
1599 $as_echo "$ac_res" >&6; } |
|
1600 fi |
|
1601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
|
1602 |
|
1603 } # ac_fn_c_check_header_mongrel |
|
1604 |
1482 # ac_fn_c_try_run LINENO |
1605 # ac_fn_c_try_run LINENO |
1483 # ---------------------- |
1606 # ---------------------- |
1484 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
1607 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
1485 # that executables *can* be run. |
1608 # that executables *can* be run. |
1486 ac_fn_c_try_run () |
1609 ac_fn_c_try_run () |
1518 rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
1641 rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
1519 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1520 as_fn_set_status $ac_retval |
1643 as_fn_set_status $ac_retval |
1521 |
1644 |
1522 } # ac_fn_c_try_run |
1645 } # ac_fn_c_try_run |
|
1646 |
|
1647 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
|
1648 # ------------------------------------------------------- |
|
1649 # Tests whether HEADER exists and can be compiled using the include files in |
|
1650 # INCLUDES, setting the cache variable VAR accordingly. |
|
1651 ac_fn_c_check_header_compile () |
|
1652 { |
|
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
|
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
|
1655 $as_echo_n "checking for $2... " >&6; } |
|
1656 if eval \${$3+:} false; then : |
|
1657 $as_echo_n "(cached) " >&6 |
|
1658 else |
|
1659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
1660 /* end confdefs.h. */ |
|
1661 $4 |
|
1662 #include <$2> |
|
1663 _ACEOF |
|
1664 if ac_fn_c_try_compile "$LINENO"; then : |
|
1665 eval "$3=yes" |
|
1666 else |
|
1667 eval "$3=no" |
|
1668 fi |
|
1669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
1670 fi |
|
1671 eval ac_res=\$$3 |
|
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
|
1673 $as_echo "$ac_res" >&6; } |
|
1674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
|
1675 |
|
1676 } # ac_fn_c_check_header_compile |
1523 cat >config.log <<_ACEOF |
1677 cat >config.log <<_ACEOF |
1524 This file contains any messages produced by compilers while |
1678 This file contains any messages produced by compilers while |
1525 running configure, to aid debugging if configure makes a mistake. |
1679 running configure, to aid debugging if configure makes a mistake. |
1526 |
1680 |
1527 It was created by $as_me, which was |
1681 It was created by $as_me, which was |
2984 result=no |
3140 result=no |
2985 fi |
3141 fi |
2986 |
3142 |
2987 if test "$result" = "yes"; then |
3143 if test "$result" = "yes"; then |
2988 LIBS="$LIBS -lwiringPi -lwiringPiDev" |
3144 LIBS="$LIBS -lwiringPi -lwiringPiDev" |
2989 else |
3145 ac_ext=c |
2990 as_fn_error $? "libwiringPi not found" "$LINENO" 5 |
|
2991 fi |
|
2992 |
|
2993 |
|
2994 # |
|
2995 # Additional commandline switches |
|
2996 # |
|
2997 # Check whether --enable-experiment was given. |
|
2998 if test "${enable_experiment+set}" = set; then : |
|
2999 enableval=$enable_experiment; experiment=$enableval |
|
3000 else |
|
3001 experiment=no |
|
3002 fi |
|
3003 |
|
3004 if test "$experiment" = "yes"; then |
|
3005 $as_echo "#define USE_EXPERIMENT 1" >>confdefs.h |
|
3006 |
|
3007 fi |
|
3008 |
|
3009 # Check whether --enable-debugging was given. |
|
3010 if test "${enable_debugging+set}" = set; then : |
|
3011 enableval=$enable_debugging; debugging=$enableval |
|
3012 else |
|
3013 debugging=no |
|
3014 fi |
|
3015 |
|
3016 if test "$debugging" = "yes"; then |
|
3017 CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" |
|
3018 else |
|
3019 CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" |
|
3020 fi |
|
3021 |
|
3022 ac_ext=c |
|
3023 ac_cpp='$CPP $CPPFLAGS' |
3146 ac_cpp='$CPP $CPPFLAGS' |
3024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
3147 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
3025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
3148 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
3026 ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3149 ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3284 fi |
3407 fi |
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3286 $as_echo "$ac_cv_path_EGREP" >&6; } |
3409 $as_echo "$ac_cv_path_EGREP" >&6; } |
3287 EGREP="$ac_cv_path_EGREP" |
3410 EGREP="$ac_cv_path_EGREP" |
3288 |
3411 |
|
3412 |
|
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
|
3414 $as_echo_n "checking for ANSI C header files... " >&6; } |
|
3415 if ${ac_cv_header_stdc+:} false; then : |
|
3416 $as_echo_n "(cached) " >&6 |
|
3417 else |
|
3418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
3419 /* end confdefs.h. */ |
|
3420 #include <stdlib.h> |
|
3421 #include <stdarg.h> |
|
3422 #include <string.h> |
|
3423 #include <float.h> |
|
3424 |
|
3425 int |
|
3426 main () |
|
3427 { |
|
3428 |
|
3429 ; |
|
3430 return 0; |
|
3431 } |
|
3432 _ACEOF |
|
3433 if ac_fn_c_try_compile "$LINENO"; then : |
|
3434 ac_cv_header_stdc=yes |
|
3435 else |
|
3436 ac_cv_header_stdc=no |
|
3437 fi |
|
3438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
3439 |
|
3440 if test $ac_cv_header_stdc = yes; then |
|
3441 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
|
3442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
3443 /* end confdefs.h. */ |
|
3444 #include <string.h> |
|
3445 |
|
3446 _ACEOF |
|
3447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
|
3448 $EGREP "memchr" >/dev/null 2>&1; then : |
|
3449 |
|
3450 else |
|
3451 ac_cv_header_stdc=no |
|
3452 fi |
|
3453 rm -f conftest* |
|
3454 |
|
3455 fi |
|
3456 |
|
3457 if test $ac_cv_header_stdc = yes; then |
|
3458 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
|
3459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
3460 /* end confdefs.h. */ |
|
3461 #include <stdlib.h> |
|
3462 |
|
3463 _ACEOF |
|
3464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
|
3465 $EGREP "free" >/dev/null 2>&1; then : |
|
3466 |
|
3467 else |
|
3468 ac_cv_header_stdc=no |
|
3469 fi |
|
3470 rm -f conftest* |
|
3471 |
|
3472 fi |
|
3473 |
|
3474 if test $ac_cv_header_stdc = yes; then |
|
3475 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
|
3476 if test "$cross_compiling" = yes; then : |
|
3477 : |
|
3478 else |
|
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
3480 /* end confdefs.h. */ |
|
3481 #include <ctype.h> |
|
3482 #include <stdlib.h> |
|
3483 #if ((' ' & 0x0FF) == 0x020) |
|
3484 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
|
3485 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
|
3486 #else |
|
3487 # define ISLOWER(c) \ |
|
3488 (('a' <= (c) && (c) <= 'i') \ |
|
3489 || ('j' <= (c) && (c) <= 'r') \ |
|
3490 || ('s' <= (c) && (c) <= 'z')) |
|
3491 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
|
3492 #endif |
|
3493 |
|
3494 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
|
3495 int |
|
3496 main () |
|
3497 { |
|
3498 int i; |
|
3499 for (i = 0; i < 256; i++) |
|
3500 if (XOR (islower (i), ISLOWER (i)) |
|
3501 || toupper (i) != TOUPPER (i)) |
|
3502 return 2; |
|
3503 return 0; |
|
3504 } |
|
3505 _ACEOF |
|
3506 if ac_fn_c_try_run "$LINENO"; then : |
|
3507 |
|
3508 else |
|
3509 ac_cv_header_stdc=no |
|
3510 fi |
|
3511 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
|
3512 conftest.$ac_objext conftest.beam conftest.$ac_ext |
|
3513 fi |
|
3514 |
|
3515 fi |
|
3516 fi |
|
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
|
3518 $as_echo "$ac_cv_header_stdc" >&6; } |
|
3519 if test $ac_cv_header_stdc = yes; then |
|
3520 |
|
3521 $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
|
3522 |
|
3523 fi |
|
3524 |
|
3525 # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
|
3526 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
|
3527 inttypes.h stdint.h unistd.h |
|
3528 do : |
|
3529 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
|
3530 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
|
3531 " |
|
3532 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
|
3533 cat >>confdefs.h <<_ACEOF |
|
3534 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
|
3535 _ACEOF |
|
3536 |
|
3537 fi |
|
3538 |
|
3539 done |
|
3540 |
|
3541 |
|
3542 for ac_header in wiringPi.h |
|
3543 do : |
|
3544 ac_fn_c_check_header_mongrel "$LINENO" "wiringPi.h" "ac_cv_header_wiringPi_h" "$ac_includes_default" |
|
3545 if test "x$ac_cv_header_wiringPi_h" = xyes; then : |
|
3546 cat >>confdefs.h <<_ACEOF |
|
3547 #define HAVE_WIRINGPI_H 1 |
|
3548 _ACEOF |
|
3549 WIRINGPI=Yes |
|
3550 else |
|
3551 WIRINGPI=No |
|
3552 fi |
|
3553 |
|
3554 done |
|
3555 |
|
3556 fi |
|
3557 |
|
3558 |
|
3559 # |
|
3560 # Additional commandline switches |
|
3561 # |
|
3562 # Check whether --enable-experiment was given. |
|
3563 if test "${enable_experiment+set}" = set; then : |
|
3564 enableval=$enable_experiment; experiment=$enableval |
|
3565 else |
|
3566 experiment=no |
|
3567 fi |
|
3568 |
|
3569 if test "$experiment" = "yes"; then |
|
3570 $as_echo "#define USE_EXPERIMENT 1" >>confdefs.h |
|
3571 |
|
3572 fi |
|
3573 |
|
3574 # Check whether --enable-debugging was given. |
|
3575 if test "${enable_debugging+set}" = set; then : |
|
3576 enableval=$enable_debugging; debugging=$enableval |
|
3577 else |
|
3578 debugging=no |
|
3579 fi |
|
3580 |
|
3581 if test "$debugging" = "yes"; then |
|
3582 CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" |
|
3583 else |
|
3584 CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" |
|
3585 fi |
3289 |
3586 |
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3291 $as_echo_n "checking for ANSI C header files... " >&6; } |
3588 $as_echo_n "checking for ANSI C header files... " >&6; } |
3292 if ${ac_cv_header_stdc+:} false; then : |
3589 if ${ac_cv_header_stdc+:} false; then : |
3293 $as_echo_n "(cached) " >&6 |
3590 $as_echo_n "(cached) " >&6 |
4683 |
4980 |
4684 Configuration summary : |
4981 Configuration summary : |
4685 |
4982 |
4686 Version : ............ ${VERSION} |
4983 Version : ............ ${VERSION} |
4687 Main directory : ..... ${prefix} |
4984 Main directory : ..... ${prefix} |
|
4985 WiringPi : ........... ${WIRINGPI} |
4688 |
4986 |
4689 Now type 'make' and 'sudo make install' |
4987 Now type 'make' and 'sudo make install' |
4690 " >&5 |
4988 " >&5 |
4691 $as_echo " |
4989 $as_echo " |
4692 -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- |
4990 -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- |
4693 |
4991 |
4694 Configuration summary : |
4992 Configuration summary : |
4695 |
4993 |
4696 Version : ............ ${VERSION} |
4994 Version : ............ ${VERSION} |
4697 Main directory : ..... ${prefix} |
4995 Main directory : ..... ${prefix} |
|
4996 WiringPi : ........... ${WIRINGPI} |
4698 |
4997 |
4699 Now type 'make' and 'sudo make install' |
4998 Now type 'make' and 'sudo make install' |
4700 " >&6; } |
4999 " >&6; } |
4701 |
5000 |