Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (29 sloc) 1.25 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`
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 ${ERTSBASE}/include -I ${ERLDIR}/lib/${ERL_INTERFACE}/include -L${ERLDIR}/lib/${ERL_INTERFACE}/lib/ -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_ARG_ENABLE(enable_64bit, [ --enable-64bit enable 64bit build (needed on some OS X systems) [[default=no]]])
AC_SUBST(enable_64bit)
AC_OUTPUT([c/Makefile Makefile])
Something went wrong with that request. Please try again.