mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-28 00:48:54 +00:00
36c7e492e8
- ./configure detects if javac and JDK are present - Makefile default target builds libservald.so - probably doesn't work on Mac OS X (yet)
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(dna.c)
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_JAVAC
|
|
|
|
AC_CHECK_LIB(c,srandomdev)
|
|
|
|
AC_CHECK_HEADERS(stdio.h errno.h stdlib.h strings.h unistd.h string.h arpa/inet.h sys/socket.h sys/mman.h sys/time.h poll.h netdb.h linux/if.h linux/netlink.h linux/rtnetlink.h net/if.h netinet/in.h ifaddrs.h net/route.h signal.h)
|
|
|
|
AC_JNI_INCLUDE_DIR
|
|
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS; do
|
|
CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
|
|
done
|
|
|
|
echo "Fetching and building NaCl if required."
|
|
echo "(this can take HOURS to build depending on your architecture,"
|
|
echo " but fortunately it only needs to happen once.)"
|
|
cd nacl
|
|
./nacl-gcc-prep
|
|
cd ..
|
|
CFLAGS="$CFLAGS -Inacl/"`cat nacl/naclinc.txt`
|
|
LDFLAGS="$LDFLAGS nacl/"`cat nacl/nacllib.txt`
|
|
|
|
AC_CHECK_LIB(m,sqrtf,[LDFLAGS="$LDFLAGS -lm"])
|
|
AC_CHECK_LIB(nsl,callrpc,[LDFLAGS="$LDFLAGS -lnsl"])
|
|
AC_CHECK_LIB(socket,socket,[LDFLAGS="$LDFLAGS -lsocket"])
|
|
AC_CHECK_LIB(dl,dlopen,[LDFLAGS="$LDFLAGS -ldl"])
|
|
AC_CHECK_LIB(pthread,pthread_create,[LDFLAGS="$LDFLAGS -lpthread"])
|
|
AC_CHECK_FILE(/Library/Frameworks/SDL.framework,[LDFLAGS="$LDFLAGS -framework SDL"; CFLAGS="$CFLAGS -DWITH_SDL";])
|
|
|
|
AC_OUTPUT(Makefile)
|