yatce / configure.ac

The autotoolize branch has multiple heads

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([yatce], [0.1], [kuenishi@gmail.com])
AC_CONFIG_SRCDIR([c_src/erl_tc_driver.h])
AC_CONFIG_AUX_DIR([auxdir])
AC_CONFIG_HEADERS([c_src/config.h])

AM_INIT_AUTOMAKE(yatce, 0.1)

AC_CONFIG_MACRO_DIR([m4])

AC_CANONICAL_HOST

INCLUDE=-I/opt/local/include
INCLUDES=-I/opt/local/include
AC_MSG_WARN([[stinks  --Iron Maiden - $INCLUDE $INCLUDES @INCLUDE@ ]])

#AC_LANG_ERLANG

# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
AC_ERLANG_NEED_ERL
AC_ERLANG_NEED_ERLC
#AC_ERLANG_SUBST_ROOT_DIR
#AC_ERLANG_SUBST_LIB_DIR
#AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(yatce, 0.1)

#AC_ERLANG_CHECK_LIB([stdlib],
#    [echo "stdlib version \"$ERLANG_LIB_VER_stdlib\""
#     echo "is installed in \"$ERLANG_LIB_DIR_stdlib\""],
#     [AC_MSG_ERROR([stdlib was not found!])])

# see this (don't know 2.63 is compatible or not);
# http://www.opensource.apple.com/source/autoconf/autoconf-14/autoconf/lib/autoconf/erlang.m4
#AC_ERLANG_CHECK_LIB(common_test)
#AC_ERLANG_SUBST_ROOT_DIR

# http://www.geocities.co.jp/SiliconValley/4137/dir4/autoconf.html
# erlang driverではsuffixが.soでなくてはいけないので。
dnl (*) これは結構基本的なテクニック。HP-UXのマシンは共有ライブラリの拡張子
dnl      (他の大部分のワークステーションの .so と違い) .sl なので、
dnl      そのチェックをしています(他の拡張子をもつマシンもありますが)
SHLIB_SUFFIX=so
#hosttype=`uname`
#if test $hosttype = "HP-UX"; then
#    SHLIB_SUFFIX=sl
#fi
AC_SUBST(SHLIB_SUFFIX)


# Checks for libraries.
# FIXME: Replace `main' with a function in `-lc':
AC_CHECK_LIB([c], [main])
# FIXME: Replace `main' with a function in `-lei_st':
AC_CHECK_LIB([ei_st], [driver_alloc])
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [sin])
# FIXME: Replace `main' with a function in `-logdir':
#AC_CHECK_LIB([ogdir], [main])
# FIXME: Replace `main' with a function in `-lpthread':
AC_CHECK_LIB([pthread], [pthread_create])
# FIXME: Replace `main' with a function in `-ltokyocabinet':
AC_CHECK_LIB([tokyocabinet], [tcadbopen])
# FIXME: Replace `main' with a function in `-lz':
#AC_CHECK_LIB([z], [])

# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h stdio.h])
AC_CHECK_HEADERS([erl_driver.h ei.h])
AC_CHECK_HEADERS([tcutil.h tcadb.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.