-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfigure.ac
48 lines (38 loc) · 1.29 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT([highway], [1.1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/highway.c])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([no-define foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
m4_include([ax_pthread.m4])
AX_PTHREAD(
[AC_CHECK_HEADERS([pthread.h])],
[AC_MSG_WARN([No pthread support.])]
)
# Checks for libraries.
AC_CHECK_LIB([iconv], [iconv])
AC_CHECK_LIB([tcmalloc], [tc_malloc])
AC_CHECK_LIB([m], [log10])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -Wall -std=gnu99"
CC="$PTHREAD_CC"
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([fcntl.h inttypes.h locale.h malloc.h stddef.h stdint.h stdlib.h string.h strings.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_MEMBERS([struct dirent.d_namlen], , , [#include <dirent.h>])
# Checks for library functions.
AC_FUNC_REALLOC
AC_CHECK_FUNCS([atexit memchr memmove memset regcomp strstr])
if test "x$OS" = xWindows_NT; then
LIBS="$LIBS -lshlwapi -liconv"
fi
AC_CONFIG_FILES([Makefile])
AC_OUTPUT