forked from osmocom/wireshark
Cmake: check for popcount, and build it from wsutil/popcount.c if missing.
Change-Id: Id646a9f0b1fc6acafa99a78725e3f0ec8a48c170 Reviewed-on: https://code.wireshark.org/review/6006 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
4009231b2c
commit
1b37f4c5ef
|
@ -86,6 +86,7 @@ check_function_exists("mmap" HAVE_MMAP)
|
|||
check_function_exists("mprotect" HAVE_MPROTECT)
|
||||
check_function_exists("mkdtemp" HAVE_MKDTEMP)
|
||||
check_function_exists("mkstemp" HAVE_MKSTEMP)
|
||||
check_function_exists("popcount" HAVE_POPCOUNT)
|
||||
check_function_exists("setresgid" HAVE_SETRESGID)
|
||||
check_function_exists("setresuid" HAVE_SETRESUID)
|
||||
check_function_exists("strptime" HAVE_STRPTIME)
|
||||
|
|
|
@ -242,6 +242,9 @@
|
|||
/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
|
||||
#cmakedefine HAVE_PCAP_SET_TSTAMP_PRECISION 1
|
||||
|
||||
/* Define to 1 if you have the popcount function. */
|
||||
#cmakedefine HAVE_POPCOUNT 1
|
||||
|
||||
/* Define to 1 if you have the <portaudio.h> header file. */
|
||||
#cmakedefine HAVE_PORTAUDIO_H 1
|
||||
|
||||
|
|
|
@ -38,6 +38,12 @@ if(HAVE_SSE4_2)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_POPCOUNT)
|
||||
set( WSUTIL_POPCOUNT_FILES
|
||||
popcount.c
|
||||
)
|
||||
endif()
|
||||
|
||||
set(WSUTIL_FILES
|
||||
adler32.c
|
||||
aes.c
|
||||
|
@ -89,6 +95,7 @@ set(WSUTIL_FILES
|
|||
ws_version_info.c
|
||||
${WSUTIL_PLATFORM_FILES}
|
||||
${WSUTIL_SSE42_FILES}
|
||||
${WSUTIL_POPCOUNT_FILES}
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
|
|
Loading…
Reference in New Issue