microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
9e7f8e5b1dd903dfdbb526fdb68db0ef83d9a7e8

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/externals/farmhash/configure.ac

98lines · modecode

1m4_define([farmhash_major], [1])
2m4_define([farmhash_minor], [1])
3m4_define([farmhash_patchlevel], [0])
4
5# Libtool shared library interface versions (current:revision:age)
6# Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B)
7# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
8m4_define([farmhash_ltversion], [2:0:0])
9
10AC_PREREQ([2.65])
11AC_INIT([FarmHash], [farmhash_major.farmhash_minor.farmhash_patchlevel], [farmhash-discuss@googlegroups.com])
12AC_CONFIG_HEADERS([config.h])
13AM_INIT_AUTOMAKE([1.10 no-define foreign])
14LT_PREREQ([2.2])
15LT_INIT
16
17AC_CONFIG_FILES([Makefile
18 src/Makefile])
19AC_CONFIG_SRCDIR([src/farmhash.h])
20AC_CONFIG_MACRO_DIR([m4])
21
22AC_ARG_ENABLE([optional-builtin-expect],
23 AS_HELP_STRING("Assume __builtin_expect() may or may not be available. The default is to assume it is available."),
24 [ farmhash_optional_builtin_expect=true ],
25 [])
26AM_CONDITIONAL([OPTIONAL_BUILTIN_EXPECT], [test x$farmhash_optional_builtin_expect = xtrue ])
27
28AC_ARG_ENABLE([optional-builtin-bswap],
29 AS_HELP_STRING("Assume __builtin_bswap32() and similar may or may not be available. The default is to assume they are available."),
30 [ farmhash_optional_builtin_bswap=true ],
31 [])
32AM_CONDITIONAL([OPTIONAL_BUILTIN_BSWAP], [test x$farmhash_optional_builtin_bswap = xtrue ])
33
34# Checks for programs.
35AC_PROG_CXX
36AC_LANG([C++])
37AC_C_BIGENDIAN
38
39# Checks for libraries.
40
41# Checks for header files.
42AC_CHECK_HEADERS([stdint.h stdlib.h])
43
44# Checks for typedefs, structures, and compiler characteristics.
45#AC_C_INLINE
46#AC_TYPE_SIZE_T
47#AC_TYPE_SSIZE_T
48#AC_TYPE_UINT32_T
49#AC_TYPE_UINT64_T
50#AC_TYPE_UINT8_T
51
52# Check for __builtin_expect
53AC_MSG_CHECKING([if the compiler supports __builtin_expect])
54AC_COMPILE_IFELSE(
55 [AC_LANG_PROGRAM(, [[return __builtin_expect(1, 1) ? 1 : 0;]])],
56 [
57 farmhash_have_builtin_expect=yes
58 AC_MSG_RESULT([yes])
59], [
60 farmhash_have_builtin_expect=no
61 AC_MSG_RESULT([no])
62])
63if test x$farmhash_have_builtin_expect = xyes ; then
64 AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.])
65fi
66
67# Check for __builtin_bswap32
68AC_MSG_CHECKING([if the compiler supports __builtin_bswap32])
69AC_COMPILE_IFELSE(
70 [AC_LANG_PROGRAM(, [[return __builtin_bswap32(0xabcd1234) == 0x3412cdab ? 0 : 1;]])],
71 [
72 farmhash_have_builtin_bswap=yes
73 AC_MSG_RESULT([yes])
74], [
75 farmhash_have_builtin_bswap=no
76 AC_MSG_RESULT([no])
77])
78if test x$farmhash_have_builtin_bswap = xyes ; then
79 AC_DEFINE([HAVE_BUILTIN_BSWAP], [1], [Define to 1 if the compiler supports __builtin_bswap32.])
80fi
81
82AC_OUTPUT
83
84echo \
85"-------------------------------------------------
86
87${PACKAGE_NAME} Version ${PACKAGE_VERSION}
88
89Prefix: '${prefix}'.
90Compiler: '${CXX} ${CXXFLAGS}'
91
92Now type 'make @<:@<target>@:>@'
93 where the optional <target> is:
94 all - build everything
95 check - build and run tests
96 install - install everything
97
98--------------------------------------------------"
99