blob: 662653a8c07ba35830ca3009ac2527e47a39ef17 (
plain)
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
|
AC_INIT([eselect-python], [20091230])
CFLAGS="${CFLAGS--march=native -O3 -pipe -fno-ident}"
LDFLAGS="${LDFLAGS--Wl,-O1,--as-needed,--gc-sections,--hash-style=gnu}"
AC_PROG_CC
AC_PATH_PROG(INSTALL, install)
MKDIR="${MKDIR:-${INSTALL} -d}"
AC_USE_SYSTEM_EXTENSIONS
# strndup() was introduced in POSIX.1-2008.
AC_MSG_CHECKING([for strndup])
old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Wall -Werror -Wextra"
AC_LINK_IFELSE(
[#include <string.h>
int main()
{
strndup("", 0);
return 0;
}], [have_strndup="1"], [have_strndup="0"])
if test "${have_strndup}" = "1"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_STRNDUP], [1], [Define to 1 if you have the 'strndup' function.])
else
AC_MSG_RESULT([no])
fi
CFLAGS="${old_CFLAGS}"
AC_SUBST([MKDIR])
# Create output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|