@@ -506,16 +506,14 @@ endif()
506506
507507php_search_libraries(
508508 dlopen
509- HAVE_LIBDL
510509 HEADERS dlfcn.h
511- LIBRARIES
512- ${CMAKE_DL_LIBS}
510+ LIBRARIES ${CMAKE_DL_LIBS}
511+ VARIABLE HAVE_LIBDL
513512 TARGET php_configuration INTERFACE
514513)
515514
516515php_search_libraries(
517516 sin
518- HAVE_SIN
519517 HEADERS math.h
520518 LIBRARIES m
521519 TARGET php_configuration INTERFACE
@@ -532,7 +530,6 @@ endif()
532530# The socket() is mostly in C library (Solaris 11.4...)
533531php_search_libraries(
534532 socket
535- HAVE_SOCKET
536533 HEADERS
537534 sys/socket.h
538535 winsock.h
@@ -546,31 +543,30 @@ php_search_libraries(
546543# The socketpair() is mostly in C library (Solaris 11.4...), except Windows.
547544php_search_libraries(
548545 socketpair
549- HAVE_SOCKETPAIR
550546 HEADERS sys/socket.h
551547 LIBRARIES
552548 socket # Solaris <= 11.3, illumos
553549 network # Haiku
550+ VARIABLE HAVE_SOCKETPAIR
554551 TARGET php_configuration INTERFACE
555552)
556553
557554# The gethostname() is mostly in C library (Solaris/illumos...)
558555php_search_libraries(
559556 gethostname
560- HAVE_GETHOSTNAME
561557 HEADERS
562558 unistd.h
563559 winsock.h
564560 LIBRARIES
565561 network # Haiku
566562 ws2_32 # Windows
563+ VARIABLE HAVE_GETHOSTNAME
567564 TARGET php_configuration INTERFACE
568565)
569566
570567# The gethostbyaddr() is mostly in C library (Solaris 11.4...)
571568php_search_libraries(
572569 gethostbyaddr
573- HAVE_GETHOSTBYADDR
574570 HEADERS
575571 netdb.h
576572 sys/socket.h
@@ -586,7 +582,6 @@ php_search_libraries(
586582# and illumos don't have it.
587583php_search_libraries(
588584 openpty
589- HAVE_OPENPTY
590585 HEADERS
591586 pty.h
592587 libutil.h # FreeBSD
@@ -595,13 +590,13 @@ php_search_libraries(
595590 LIBRARIES
596591 util # Some BSD-based systems
597592 bsd # Haiku
593+ VARIABLE HAVE_OPENPTY
598594 TARGET php_configuration INTERFACE
599595)
600596
601597# The inet_ntop() is mostly in C library (Solaris 11.4, illumos, BSD*, Linux...)
602598php_search_libraries(
603599 inet_ntop
604- _HAVE_INET_NTOP
605600 HEADERS
606601 arpa/inet.h
607602 ws2tcpip.h
@@ -610,6 +605,7 @@ php_search_libraries(
610605 resolv # Solaris 2.6..7
611606 network # Haiku
612607 ws2_32 # Windows
608+ VARIABLE _HAVE_INET_NTOP
613609 TARGET php_configuration INTERFACE
614610)
615611if (NOT _HAVE_INET_NTOP)
@@ -619,7 +615,6 @@ endif()
619615# The inet_pton() is mostly in C library (Solaris 11.4, illumos...)
620616php_search_libraries(
621617 inet_pton
622- _HAVE_INET_PTON
623618 HEADERS
624619 arpa/inet.h
625620 ws2tcpip.h
@@ -628,6 +623,7 @@ php_search_libraries(
628623 resolv # Solaris 2.6..7
629624 network # Haiku
630625 ws2_32 # Windows
626+ VARIABLE _HAVE_INET_PTON
631627 TARGET php_configuration INTERFACE
632628)
633629if (NOT _HAVE_INET_PTON)
@@ -637,18 +633,17 @@ endif()
637633# The nanosleep is mostly in C library (Solaris 11, illumos...)
638634php_search_libraries(
639635 nanosleep
640- HAVE_NANOSLEEP
641636 HEADERS
642637 time.h
643638 LIBRARIES
644639 rt # Solaris <= 10
640+ VARIABLE HAVE_NANOSLEEP
645641 TARGET php_configuration INTERFACE
646642)
647643
648644# The setsockopt() is mostly in C library (Solaris 11.4...)
649645php_search_libraries(
650646 setsockopt
651- HAVE_SETSOCKOPT
652647 HEADERS
653648 sys/types.h
654649 sys/socket.h
@@ -663,7 +658,6 @@ php_search_libraries(
663658# Check for Solaris/illumos process mapping.
664659php_search_libraries(
665660 Pgrab
666- HAVE_PGRAB
667661 HEADERS libproc.h
668662 LIBRARIES proc
669663 TARGET php_configuration INTERFACE
@@ -672,81 +666,81 @@ php_search_libraries(
672666# The gai_strerror() is mostly in C library (Solaris 11.4...)
673667php_search_libraries(
674668 gai_strerror
675- HAVE_GAI_STRERROR
676669 HEADERS netdb.h
677670 LIBRARIES
678671 socket # Solaris <= 11.3, illumos
679672 network # Haiku
673+ VARIABLE HAVE_GAI_STRERROR
680674 TARGET php_configuration INTERFACE
681675)
682676
683677# The getprotobyname() is mostly in C library (Solaris 11.4...)
684678php_search_libraries(
685679 getprotobyname
686- HAVE_GETPROTOBYNAME
687680 HEADERS
688681 netdb.h
689682 winsock.h
690683 LIBRARIES
691684 socket # Solaris <= 11.3, illumos
692685 network # Haiku
693686 ws2_32 # Windows
687+ VARIABLE HAVE_GETPROTOBYNAME
694688 TARGET php_configuration INTERFACE
695689)
696690
697691# The getprotobynumber() is mostly in C library (Solaris 11.4...)
698692php_search_libraries(
699693 getprotobynumber
700- HAVE_GETPROTOBYNUMBER
701694 HEADERS
702695 netdb.h
703696 winsock.h
704697 LIBRARIES
705698 socket # Solaris <= 11.3, illumos
706699 network # Haiku
707700 ws2_32 # Windows
701+ VARIABLE HAVE_GETPROTOBYNUMBER
708702 TARGET php_configuration INTERFACE
709703)
710704
711705# The getservbyname() is mostly in C library (Solaris 11.4...)
712706php_search_libraries(
713707 getservbyname
714- HAVE_GETSERVBYNAME
715708 HEADERS
716709 netdb.h
717710 winsock.h
718711 LIBRARIES
719712 socket # Solaris <= 11.3, illumos
720713 network # Haiku
721714 ws2_32 # Windows
715+ VARIABLE HAVE_GETSERVBYNAME
722716 TARGET php_configuration INTERFACE
723717)
724718
725719# The getservbyport() is mostly in C library (Solaris 11.4...)
726720php_search_libraries(
727721 getservbyport
728- HAVE_GETSERVBYPORT
729722 HEADERS
730723 netdb.h
731724 winsock.h
732725 LIBRARIES
733726 socket # Solaris <= 11.3, illumos
734727 network # Haiku
735728 ws2_32 # Windows
729+ VARIABLE HAVE_GETSERVBYPORT
736730 TARGET php_configuration INTERFACE
737731)
738732
739733# The shutdown() is mostly in C library (Solaris 11.4...)
740734php_search_libraries(
741735 shutdown
742- HAVE_SHUTDOWN
743736 HEADERS
744737 sys/socket.h
745738 winsock.h
746739 LIBRARIES
747740 socket # Solaris <= 11.3, illumos
748741 network # Haiku
749742 ws2_32 # Windows
743+ VARIABLE HAVE_SHUTDOWN
750744 TARGET php_configuration INTERFACE
751745)
752746
0 commit comments