2013-12-05 10:56:31 +04:00
|
|
|
# Jerasure autoconf template
|
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
AC_PREREQ([2.65])
|
|
|
|
AC_INIT([Jerasure], [2.0], [], [],
|
2014-12-25 14:23:05 +03:00
|
|
|
[https://jerasure.org/jerasure/jerasure])
|
2014-03-08 23:08:36 +04:00
|
|
|
AC_CONFIG_SRCDIR([src/jerasure.c])
|
|
|
|
AC_CONFIG_HEADERS([include/config.h])
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
AM_INIT_AUTOMAKE([1.13 -Wall -Wno-extra-portability])
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
# Package default C compiler flags.
|
|
|
|
dnl This must be before LT_INIT and AC_PROG_CC.
|
|
|
|
: ${CFLAGS='-g -O3 -Wall'}
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
LT_INIT([disable-static])
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
# Checks for programs.
|
2013-12-05 10:56:31 +04:00
|
|
|
AC_PROG_CC
|
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
# Checks for libraries.
|
2013-12-05 10:56:31 +04:00
|
|
|
AC_CHECK_LIB([gf_complete], [gf_init_easy], [],
|
2014-03-08 23:08:36 +04:00
|
|
|
[AC_MSG_FAILURE(
|
|
|
|
[You need to have gf_complete installed.
|
2014-12-25 14:23:05 +03:00
|
|
|
gf_complete is available from http://jerasure.org/jerasure/gf-complete])
|
2013-12-05 10:56:31 +04:00
|
|
|
])
|
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h])
|
|
|
|
AC_CHECK_HEADERS([gf_complete.h gf_general.h gf_method.h gf_rand.h])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AX_EXT
|
|
|
|
|
2014-06-09 22:37:29 +04:00
|
|
|
AC_ARG_ENABLE([sse],
|
|
|
|
AS_HELP_STRING([--disable-sse], [Build without SSE optimizations]),
|
|
|
|
[if test "x$enableval" = "xno" ; then
|
|
|
|
SIMD_FLAGS=""
|
|
|
|
echo "DISABLED SSE!!!"
|
|
|
|
fi]
|
|
|
|
)
|
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_CHECK_FUNCS([bzero getcwd gettimeofday mkdir strchr strdup strrchr])
|
2013-12-05 10:56:31 +04:00
|
|
|
|
2014-03-08 23:08:36 +04:00
|
|
|
AC_CONFIG_FILES([Examples/Makefile
|
|
|
|
Makefile
|
|
|
|
src/Makefile])
|
2013-12-05 10:56:31 +04:00
|
|
|
AC_OUTPUT
|