|
344 | 344 | rm -f conftest*]) |
345 | 345 |
|
346 | 346 |
|
347 | | -dnl AC_CHECK_STD_NAMESPACE checks if the C++-Compiler supports the |
348 | | -dnl standard name space. |
349 | | -dnl |
350 | | -dnl AC_CHECK_STD_NAMESPACE |
351 | | -AC_DEFUN(AC_CHECK_STD_NAMESPACE, |
352 | | -[AC_MSG_CHECKING([for C++ standard namespace]) |
353 | | -AH_TEMPLATE(HAVE_STD_NAMESPACE, [Define if ANSI standard C++ includes use std namespace.]) |
354 | | -AC_CACHE_VAL(ac_cv_check_std_namespace, |
355 | | -[AC_TRY_COMPILE_AND_LINK([ |
356 | | -#include <iostream> |
357 | | -using namespace std; |
358 | | -],[ |
359 | | - cout << "Hello World" << endl; |
360 | | -], eval "ac_cv_check_std_namespace=yes", eval "ac_cv_check_std_namespace=no")dnl |
361 | | -])dnl |
362 | | -if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then |
363 | | - AC_MSG_RESULT(yes) |
364 | | - AC_DEFINE(HAVE_STD_NAMESPACE) |
365 | | -else |
366 | | - AC_MSG_RESULT(no) |
367 | | -fi |
368 | | -]) |
369 | | - |
370 | | - |
371 | 347 | dnl AC_CHECK_GNU_LIBTOOL checks whether libtool is GNU libtool. |
372 | 348 | dnl This macro requires that 'libtool' exists in the current path, |
373 | 349 | dnl i.e. AC_CHECK_PROGS(LIBTOOL, libtool, :) should be executed and evaluated |
|
514 | 490 | ]) |
515 | 491 |
|
516 | 492 |
|
517 | | -dnl AC_CHECK_INTP_ACCEPT checks if the prototype for accept() |
518 | | -dnl specifies arguments 2-4 to be int* instead of size_t *. |
519 | | -dnl |
520 | | -dnl AC_CHECK_INTP_ACCEPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) |
521 | | -AC_DEFUN(AC_CHECK_INTP_ACCEPT, |
522 | | -[AC_MSG_CHECKING([ifelse([$1], , [if accept() needs int* parameters], |
523 | | -[if accept() needs int* parameters (in $1)])]) |
524 | | -AH_TEMPLATE(HAVE_INTP_ACCEPT, [Define if your system declares argument 3 of accept() |
525 | | - as int * instead of size_t * or socklen_t *.]) |
526 | | -ifelse([$1], , [ac_includes="" |
527 | | -], |
528 | | -[ac_includes="" |
529 | | -for ac_header in $1 |
530 | | -do |
531 | | - ac_includes="$ac_includes |
532 | | -#include<$ac_header>" |
533 | | -done]) |
534 | | -AC_CACHE_VAL(ac_cv_prototype_intp_accept, |
535 | | -[AC_TRY_COMPILE( |
536 | | -[#ifdef __cplusplus |
537 | | -extern "C" { |
538 | | -#endif |
539 | | -$ac_includes |
540 | | -#ifdef __cplusplus |
541 | | -} |
542 | | -#endif |
543 | | -] |
544 | | -, |
545 | | -[ |
546 | | - int i; |
547 | | - struct sockaddr *addr; |
548 | | - size_t addrlen; |
549 | | -
|
550 | | - addr = 0; |
551 | | - addrlen = 0; |
552 | | - i = accept(1, addr, &addrlen); |
553 | | -], |
554 | | -eval "ac_cv_prototype_intp_accept=no", |
555 | | -[AC_TRY_COMPILE( |
556 | | -[#ifdef __cplusplus |
557 | | -extern "C" { |
558 | | -#endif |
559 | | -$ac_includes |
560 | | -#ifdef __cplusplus |
561 | | -} |
562 | | -#endif |
563 | | -] |
564 | | -, |
565 | | -[ |
566 | | - int i; |
567 | | - struct sockaddr *addr; |
568 | | - int addrlen; |
569 | | -
|
570 | | - addr = 0; |
571 | | - addrlen = 0; |
572 | | - i = accept(1, addr, &addrlen); |
573 | | -], |
574 | | -eval "ac_cv_prototype_intp_accept=yes", eval "ac_cv_prototype_intp_accept=no")])]) |
575 | | -if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then |
576 | | - AC_MSG_RESULT(yes) |
577 | | - AC_DEFINE(HAVE_INTP_ACCEPT) |
578 | | - ifelse([$2], , :, [$2]) |
579 | | -else |
580 | | - AC_MSG_RESULT(no) |
581 | | - ifelse([$3], , , [$3]) |
582 | | -fi |
583 | | -]) |
584 | | - |
585 | | - |
586 | 493 | dnl AC_CHECK_PTHREAD_OPTION checks whether the compiler requires the |
587 | 494 | dnl -pthread option to correctly link code containing posix thread calls. |
588 | 495 | dnl This is true for example on FreeBSD. |
|
680 | 587 | ]) |
681 | 588 |
|
682 | 589 |
|
683 | | -dnl AC_CHECK_INTP_GETSOCKOPT checks if the prototype for getsockopt() |
684 | | -dnl specifies arguments 5 to be int* instead of size_t *. |
685 | | -dnl |
686 | | -dnl AC_CHECK_INTP_GETSOCKOPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) |
687 | | -AC_DEFUN(AC_CHECK_INTP_GETSOCKOPT, |
688 | | -[AC_MSG_CHECKING([ifelse([$1], , [if getsockopt() needs int* parameters], |
689 | | -[if getsockopt() needs int* parameters (in $1)])]) |
690 | | -AH_TEMPLATE(HAVE_INTP_GETSOCKOPT, [Define if your system declares argument 5 of getsockopt() |
691 | | - as int * instead of size_t * or socklen_t.]) |
692 | | -ifelse([$1], , [ac_includes="" |
693 | | -], |
694 | | -[ac_includes="" |
695 | | -for ac_header in $1 |
696 | | -do |
697 | | - ac_includes="$ac_includes |
698 | | -#include<$ac_header>" |
699 | | -done]) |
700 | | -AC_CACHE_VAL(ac_cv_prototype_intp_getsockopt, |
701 | | -[AC_TRY_COMPILE( |
702 | | -[#ifdef __cplusplus |
703 | | -extern "C" { |
704 | | -#endif |
705 | | -$ac_includes |
706 | | -#ifdef __cplusplus |
707 | | -} |
708 | | -#endif |
709 | | -] |
710 | | -, |
711 | | -[ |
712 | | - int i; |
713 | | - size_t optlen; |
714 | | - i = getsockopt(0, 0, 0, 0, &optlen); |
715 | | -], |
716 | | -eval "ac_cv_prototype_intp_getsockopt=no", |
717 | | -[AC_TRY_COMPILE( |
718 | | -[#ifdef __cplusplus |
719 | | -extern "C" { |
720 | | -#endif |
721 | | -$ac_includes |
722 | | -#ifdef __cplusplus |
723 | | -} |
724 | | -#endif |
725 | | -] |
726 | | -, |
727 | | -[ |
728 | | - int i; |
729 | | - int optlen; |
730 | | - i = getsockopt(0, 0, 0, 0, &optlen); |
731 | | -], |
732 | | -eval "ac_cv_prototype_intp_getsockopt=yes", eval "ac_cv_prototype_intp_getsockopt=no")])]) |
733 | | -if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then |
734 | | - AC_MSG_RESULT(yes) |
735 | | - AC_DEFINE(HAVE_INTP_GETSOCKOPT) |
736 | | - ifelse([$2], , :, [$2]) |
737 | | -else |
738 | | - AC_MSG_RESULT(no) |
739 | | - ifelse([$3], , , [$3]) |
740 | | -fi |
741 | | -]) |
742 | | - |
743 | | - |
744 | | -dnl AC_CXX_STD_NOTHROW checks if the compiler supports non-throwing new using |
745 | | -dnl std::nothrow. |
746 | | -dnl |
747 | | -AC_DEFUN([AC_CXX_STD_NOTHROW], |
748 | | -[AH_TEMPLATE(HAVE_STD__NOTHROW, [Define if the compiler supports std::nothrow.]) |
749 | | -AC_CACHE_CHECK(whether the compiler supports std::nothrow, |
750 | | -ac_cv_cxx_std_nothrow, |
751 | | -[AC_LANG_SAVE |
752 | | - AC_LANG_CPLUSPLUS |
753 | | - AC_TRY_COMPILE([#include <new>],[int *i = new (std::nothrow) int], |
754 | | - ac_cv_cxx_std_nothrow=yes, ac_cv_cxx_std_nothrow=no) |
755 | | - AC_LANG_RESTORE |
756 | | -]) |
757 | | -if test "$ac_cv_cxx_std_nothrow" = yes; then |
758 | | - AC_DEFINE(HAVE_STD__NOTHROW) |
759 | | -fi |
760 | | -]) |
761 | | - |
762 | | - |
763 | | -dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using |
764 | | -dnl std::nothrow. |
765 | | -dnl |
766 | | -AC_DEFUN([AC_CXX_NOTHROW_DELETE], |
767 | | -[AH_TEMPLATE(HAVE_NOTHROW_DELETE, [Define if the compiler supports operator delete (std::nothrow).]) |
768 | | -AC_CACHE_CHECK(whether the compiler supports operator delete (std::nothrow), |
769 | | -ac_cv_cxx_nothrow_delete, |
770 | | -[AC_LANG_SAVE |
771 | | - AC_LANG_CPLUSPLUS |
772 | | - AC_TRY_COMPILE([#include <new>],[int *i = new (std::nothrow) int; operator delete (i,std::nothrow)], |
773 | | - ac_cv_cxx_nothrow_delete=yes, ac_cv_cxx_nothrow_delete=no) |
774 | | - AC_LANG_RESTORE |
775 | | -]) |
776 | | -if test "$ac_cv_cxx_nothrow_delete" = yes; then |
777 | | - AC_DEFINE(HAVE_NOTHROW_DELETE) |
778 | | -fi |
779 | | -]) |
780 | | - |
781 | | - |
782 | 590 | dnl AC_CXX_STATIC_ASSERT checks if the compiler supports static_assert. |
783 | 591 | dnl |
784 | 592 | AC_DEFUN([AC_CXX_STATIC_ASSERT], |
|
0 commit comments