@@ -510,16 +510,14 @@ endif()
510510
511511php_search_libraries(
512512 dlopen
513- HAVE_LIBDL
514513 HEADERS dlfcn.h
515- LIBRARIES
516- ${CMAKE_DL_LIBS}
514+ LIBRARIES ${CMAKE_DL_LIBS}
515+ VARIABLE HAVE_LIBDL
517516 TARGET php_configuration INTERFACE
518517)
519518
520519php_search_libraries(
521520 sin
522- HAVE_SIN
523521 HEADERS math.h
524522 LIBRARIES m
525523 TARGET php_configuration INTERFACE
@@ -536,7 +534,6 @@ endif()
536534# The socket() is mostly in C library (Solaris 11.4...)
537535php_search_libraries(
538536 socket
539- HAVE_SOCKET
540537 HEADERS
541538 sys/socket.h
542539 winsock.h
@@ -550,31 +547,30 @@ php_search_libraries(
550547# The socketpair() is mostly in C library (Solaris 11.4...), except Windows.
551548php_search_libraries(
552549 socketpair
553- HAVE_SOCKETPAIR
554550 HEADERS sys/socket.h
555551 LIBRARIES
556552 socket # Solaris <= 11.3, illumos
557553 network # Haiku
554+ VARIABLE HAVE_SOCKETPAIR
558555 TARGET php_configuration INTERFACE
559556)
560557
561558# The gethostname() is mostly in C library (Solaris/illumos...)
562559php_search_libraries(
563560 gethostname
564- HAVE_GETHOSTNAME
565561 HEADERS
566562 unistd.h
567563 winsock.h
568564 LIBRARIES
569565 network # Haiku
570566 ws2_32 # Windows
567+ VARIABLE HAVE_GETHOSTNAME
571568 TARGET php_configuration INTERFACE
572569)
573570
574571# The gethostbyaddr() is mostly in C library (Solaris 11.4...)
575572php_search_libraries(
576573 gethostbyaddr
577- HAVE_GETHOSTBYADDR
578574 HEADERS
579575 netdb.h
580576 sys/socket.h
@@ -590,7 +586,6 @@ php_search_libraries(
590586# and illumos don't have it.
591587php_search_libraries(
592588 openpty
593- HAVE_OPENPTY
594589 HEADERS
595590 pty.h
596591 libutil.h # FreeBSD
@@ -599,24 +594,24 @@ php_search_libraries(
599594 LIBRARIES
600595 util # Some BSD-based systems
601596 bsd # Haiku
597+ VARIABLE HAVE_OPENPTY
602598 TARGET php_configuration INTERFACE
603599)
604600
605601# The inet_ntoa() is mostly in C library (Solaris 11.4, illumos...)
606602php_search_libraries(
607603 inet_ntoa
608- HAVE_INET_NTOA
609604 HEADERS arpa/inet.h
610605 LIBRARIES
611606 nsl # Solaris <= 11.3
612607 network # Haiku
608+ VARIABLE HAVE_INET_NTOA
613609 TARGET php_configuration INTERFACE
614610)
615611
616612# The inet_ntop() is mostly in C library (Solaris 11.4, illumos, BSD*, Linux...)
617613php_search_libraries(
618614 inet_ntop
619- HAVE_INET_NTOP
620615 HEADERS
621616 arpa/inet.h
622617 ws2tcpip.h
@@ -625,6 +620,7 @@ php_search_libraries(
625620 resolv # Solaris 2.6..7
626621 network # Haiku
627622 ws2_32 # Windows
623+ VARIABLE HAVE_INET_NTOP
628624 TARGET php_configuration INTERFACE
629625)
630626if (NOT HAVE_INET_NTOP)
@@ -634,7 +630,6 @@ endif()
634630# The inet_pton() is mostly in C library (Solaris 11.4, illumos...)
635631php_search_libraries(
636632 inet_pton
637- HAVE_INET_PTON
638633 HEADERS
639634 arpa/inet.h
640635 ws2tcpip.h
@@ -643,13 +638,13 @@ php_search_libraries(
643638 resolv # Solaris 2.6..7
644639 network # Haiku
645640 ws2_32 # Windows
641+ VARIABLE HAVE_INET_PTON
646642 TARGET php_configuration INTERFACE
647643)
648644
649645# The inet_aton() is mostly in C library (Solaris 11.4, illumos...)
650646php_search_libraries(
651647 inet_aton
652- HAVE_INET_ATON
653648 HEADERS
654649 sys/socket.h
655650 netinet/in.h
@@ -658,24 +653,24 @@ php_search_libraries(
658653 nsl # Solaris <= 11.3
659654 resolv # Solaris 2.6..7
660655 network # Haiku
656+ VARIABLE HAVE_INET_ATON
661657 TARGET php_configuration INTERFACE
662658)
663659
664660# The nanosleep is mostly in C library (Solaris 11, illumos...)
665661php_search_libraries(
666662 nanosleep
667- HAVE_NANOSLEEP
668663 HEADERS
669664 time.h
670665 LIBRARIES
671666 rt # Solaris <= 10
667+ VARIABLE HAVE_NANOSLEEP
672668 TARGET php_configuration INTERFACE
673669)
674670
675671# The setsockopt() is mostly in C library (Solaris 11.4...)
676672php_search_libraries(
677673 setsockopt
678- HAVE_SETSOCKOPT
679674 HEADERS
680675 sys/types.h
681676 sys/socket.h
@@ -690,81 +685,81 @@ php_search_libraries(
690685# The gai_strerror() is mostly in C library (Solaris 11.4...)
691686php_search_libraries(
692687 gai_strerror
693- HAVE_GAI_STRERROR
694688 HEADERS netdb.h
695689 LIBRARIES
696690 socket # Solaris <= 11.3, illumos
697691 network # Haiku
692+ VARIABLE HAVE_GAI_STRERROR
698693 TARGET php_configuration INTERFACE
699694)
700695
701696# The getprotobyname() is mostly in C library (Solaris 11.4...)
702697php_search_libraries(
703698 getprotobyname
704- HAVE_GETPROTOBYNAME
705699 HEADERS
706700 netdb.h
707701 winsock.h
708702 LIBRARIES
709703 socket # Solaris <= 11.3, illumos
710704 network # Haiku
711705 ws2_32 # Windows
706+ VARIABLE HAVE_GETPROTOBYNAME
712707 TARGET php_configuration INTERFACE
713708)
714709
715710# The getprotobynumber() is mostly in C library (Solaris 11.4...)
716711php_search_libraries(
717712 getprotobynumber
718- HAVE_GETPROTOBYNUMBER
719713 HEADERS
720714 netdb.h
721715 winsock.h
722716 LIBRARIES
723717 socket # Solaris <= 11.3, illumos
724718 network # Haiku
725719 ws2_32 # Windows
720+ VARIABLE HAVE_GETPROTOBYNUMBER
726721 TARGET php_configuration INTERFACE
727722)
728723
729724# The getservbyname() is mostly in C library (Solaris 11.4...)
730725php_search_libraries(
731726 getservbyname
732- HAVE_GETSERVBYNAME
733727 HEADERS
734728 netdb.h
735729 winsock.h
736730 LIBRARIES
737731 socket # Solaris <= 11.3, illumos
738732 network # Haiku
739733 ws2_32 # Windows
734+ VARIABLE HAVE_GETSERVBYNAME
740735 TARGET php_configuration INTERFACE
741736)
742737
743738# The getservbyport() is mostly in C library (Solaris 11.4...)
744739php_search_libraries(
745740 getservbyport
746- HAVE_GETSERVBYPORT
747741 HEADERS
748742 netdb.h
749743 winsock.h
750744 LIBRARIES
751745 socket # Solaris <= 11.3, illumos
752746 network # Haiku
753747 ws2_32 # Windows
748+ VARIABLE HAVE_GETSERVBYPORT
754749 TARGET php_configuration INTERFACE
755750)
756751
757752# The shutdown() is mostly in C library (Solaris 11.4...)
758753php_search_libraries(
759754 shutdown
760- HAVE_SHUTDOWN
761755 HEADERS
762756 sys/socket.h
763757 winsock.h
764758 LIBRARIES
765759 socket # Solaris <= 11.3, illumos
766760 network # Haiku
767761 ws2_32 # Windows
762+ VARIABLE HAVE_SHUTDOWN
768763 TARGET php_configuration INTERFACE
769764)
770765
0 commit comments