Fixed compiling on OSX, also fixes DDVTECH/mistlib#1

This commit is contained in:
Thulinma 2013-03-14 00:13:07 +01:00
parent cc8dfb5257
commit aa5056ee3d
5 changed files with 25 additions and 4 deletions

View file

@ -16,7 +16,7 @@ AC_PROG_CC
# Checks for libraries.
AC_DEFINE(_GNU_SOURCE)
#AC_CHECK_LIB(ssl, RC4)
PKG_CHECK_MODULES(DEPS, openssl)
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
@ -38,6 +38,9 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([dup2 gettimeofday memset mkdir socket strerror])
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], [CLOCK_LIB=])])
AC_SUBST([CLOCK_LIB])
# Fix chars to unsigned
AC_SUBST([global_CFLAGS], [-funsigned-char])