Skip to content

Commit 9d92580

Browse files
authored
Improve SearchLibraries module (#18)
- Result variable name is now optional as often times, only library that needs to be linked is searched and result variable is redundant - Added titles to all modules - Update texts - Added more features info
1 parent 26317d1 commit 9d92580

File tree

152 files changed

+358
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+358
-144
lines changed

cmake/Zend/cmake/MaxExecutionTimers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ endif()
5858
if(ZEND_MAX_EXECUTION_TIMERS AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
5959
php_search_libraries(
6060
timer_create
61-
HAVE_TIMER_CREATE
6261
HEADERS time.h
6362
LIBRARIES
6463
rt # Solaris <= 10, older Linux
64+
VARIABLE HAVE_TIMER_CREATE
6565
LIBRARY_VARIABLE libraryForTimerCreate
6666
)
6767

cmake/cmake/ConfigureChecks.cmake

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -510,16 +510,14 @@ endif()
510510

511511
php_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

520519
php_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...)
537535
php_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.
551548
php_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...)
562559
php_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...)
575572
php_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.
591587
php_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...)
606602
php_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...)
617613
php_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
)
630626
if(NOT HAVE_INET_NTOP)
@@ -634,7 +630,6 @@ endif()
634630
# The inet_pton() is mostly in C library (Solaris 11.4, illumos...)
635631
php_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...)
650646
php_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...)
665661
php_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...)
676672
php_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...)
691686
php_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...)
702697
php_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...)
716711
php_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...)
730725
php_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...)
744739
php_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...)
758753
php_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

cmake/cmake/modules/FindACL.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindACL
3+
24
Find the ACL library.
35
46
Module defines the following `IMPORTED` target(s):

cmake/cmake/modules/FindApache.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindApache
3+
24
Find the Apache packages and tools.
35
46
The Apache development package usually contains Apache header files, the `apr`

cmake/cmake/modules/FindAppArmor.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindAppArmor
3+
24
Find the AppArmor library.
35
46
Module defines the following `IMPORTED` target(s):

cmake/cmake/modules/FindArgon2.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindArgon2
3+
24
Find the Argon2 library.
35
46
Module defines the following `IMPORTED` target(s):

cmake/cmake/modules/FindAspell.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindAspell
3+
24
Find the GNU Aspell library.
35
46
In the past, there was a pspell library, which has been superseded by GNU's

cmake/cmake/modules/FindAtomic.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindAtomic
3+
24
Find the atomic instructions.
35
46
Module defines the following `IMPORTED` target(s):

cmake/cmake/modules/FindBerkeleyDB.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindBerkeleyDB
3+
24
Find the Berkeley DB library.
35
46
Module defines the following `IMPORTED` target(s):

cmake/cmake/modules/FindCapstone.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[=============================================================================[
2+
# FindCapstone
3+
24
Find the Capstone library.
35
46
Module defines the following `IMPORTED` target(s):

0 commit comments

Comments
 (0)