view configure.ac @ 10:5d400e07b19d

add automake tools.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 08 Jan 2010 14:48:59 +0900
parents 25b07dc82e8b
children f06fb0370caf
line wrap: on
line source

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

AC_PREREQ([2.63])
AC_INIT([TaskManager], [0.1], [kent@cr.ie.u-ryukyu.ac.jp])
AM_INIT_AUTOMAKE(TaskManager, 0.1)
AC_CONFIG_SRCDIR([memo.txt])
AC_CONFIG_HEADERS(config.h)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB

AC_CHECK_PROGS(CbCC, [cbcc gcc-cbc cbc-gcc gcc])
if test "x$CbCC" = "x"; then
    AC_MSG_ERROR([cbc compiler not found.])
fi

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT32_T
AC_TYPE_UINT32_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strdup])


#AC_ARG_ENABLE([fifo],
	      #[  --enable-fifo	use only fifo scheduler],
	      #[case "${enableval}" in
	        #yes) fifo=true;;
		#no)  fifo=false;;
		#*) AC_MSG_ERROR([bad value ${enableval} for --enable-fifo])
	      #esac],
	      #[fifo=true])
AC_ARG_WITH([mode],
	    AS_HELP_STRING([--with-mode=MODE],
			   [Specify the mode you want build: One of fifo, pthread, cell, cluster]))
if test "z$with_mode" = "z"; then
    with_mode=fifo
fi
with_mode=`echo ${with_mode} | tr '[[:upper:]]' '[[:lower:]]'`
case $with_mode in
	fifo|pthread|cell|cluster)
	  ;;
	*)
	  AC_MSG_ERROR([mode ${with_mode} is unknown.])
esac
AM_CONDITIONAL([USE_FIFO],    [test x$with_mode = xfifo])
AM_CONDITIONAL([USE_PTHREAD], [test x$with_mode = xpthread])
AM_CONDITIONAL([USE_CELL],    [test x$with_mode = xcell])
AM_CONDITIONAL([USE_CLUSTER], [test x$with_mode = xcluster])



AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT