configure.ac 913 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
AC_INIT([easyWave], [1.0], [babeyko@gfz-potsdam.de])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])

AC_PROG_CXX
AC_PROG_CC

AC_LANG(C++)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile])

AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADER_STDBOOL

AC_C_INLINE

AC_FUNC_MALLOC
AC_CHECK_FUNCS([floor pow sqrt memset strchr strdup strstr clock_gettime])

AC_ARG_ENABLE(	[cuda], 
		[AS_HELP_STRING([--disable-cuda], [Disable CUDA support.])],
		[enable_cuda="no"],
		[enable_cuda="yes"]
)

AC_MSG_NOTICE($enable_cuda)
AC_ARG_VAR([NVCC], [nvcc compiler to use])
AC_PATH_PROG([NVCC], [nvcc], [no])

AM_CONDITIONAL([ENABLE_CUDA], [test "$NVCC" != "no" && test "$enable_cuda" = "yes"])

AC_CHECK_LIB([cudart], [cudaLaunch], [cudart="yes"], [cudart="no"])
AC_CHECK_LIB([cuda], [cuInit], [cuda="yes"], [cuda="no"])
AC_MSG_NOTICE($cudart)
AC_MSG_NOTICE($cuda)

AC_PREFIX_DEFAULT([/usr/local/EasyWave])

AC_OUTPUT