Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (28 sloc) 1.16 KB
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(basic_driver, 0.0.1)
# Checks for programs.
AC_PROG_CC
AC_PATH_PROG(ERL, erl)
AC_PATH_PROG(ERLC, erlc)
#
ERLDIR=`awk -F= '/ROOTDIR=/ { print [$]2; exit; }' $ERL`
AC_SUBST(ERL)
AC_SUBST(ERLC)
AC_SUBST(ERLBINDIR)
AC_SUBST(ERLDIR)
ERL_INTERFACE=`ls ${ERLDIR}/lib | grep erl_interface | tail -n 1`
CREDIS=/Users/mrhyde/Code/redis/client-libraries/credis-read-only
ERTSBASE="`$ERL -noshell -noinput -eval 'io:format (\"~s\", [[ \"/\" ++ filename:join (lists:reverse ([ \"erts-\" ++ erlang:system_info (version) | tl (lists:reverse (string:tokens (code:lib_dir (), \"/\"))) ])) ]]).' -s erlang halt `"
AC_SUBST(ERTSBASE)
CPPFLAGS="$CPPFLAGS -I ${CREDIS} -I ${ERTSBASE}/include -I ${ERLDIR}/lib/${ERL_INTERFACE}/include -Wall -fPIC -I./"
LIBEI="${ERLDIR}/lib/${ERL_INTERFACE}/lib/libei.a"
AC_SUBST(LIBEI)
# Checks for header files.
AC_CHECK_HEADERS([])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
# Checks for library functions.
AC_HEADER_STDC
AC_OUTPUT([c_src/Makefile src/Makefile Makefile])