forked from mcfunley/juds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
64 lines (51 loc) · 1.32 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(JUDS, 0.94, [email protected])
AC_CONFIG_SRCDIR([com/etsy/net/UnixDomainSocket.c])
AC_CONFIG_HEADER([config.h])
# PROGRAMS
AC_PROG_CC
if test x$JAVA_HOME = x; then
AX_CHECK_JAVA_HOME
fi
JAVAC=$JAVA_HOME/bin/javac
if test "`$JAVAC -version 2>&1 | grep '1.6'`" = ""; then
if test "`$JAVAC -version 2>&1 | grep '1.7'`" = ""; then
AC_MSG_ERROR([The java compiler $JAVAC does not seem to be version 1.6 or 1.7 (try setting JAVA_HOME)?])
fi
fi
AC_SUBST(JAVA_HOME)
AC_SUBST(JAVAC)
# Detect the platform
if test `uname` = "Darwin"; then
PLATFORM=darwin
LIBSWITCH=-dynamiclib
M64="-arch x86_64"
M32="-arch i386"
LIBEXT=dylib
else
PLATFORM=linux
LIBSWITCH=-shared
M64=-m64
M32=-m32
LIBEXT=so
fi
AC_SUBST(PLATFORM)
AC_SUBST(LIBSWITCH)
AC_SUBST(M32)
AC_SUBST(M64)
AC_SUBST(LIBEXT)
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h strings.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SSIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([bzero socket])
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(CFLAGS)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT