forked from enlightenment/efl
164 lines
4.3 KiB
Plaintext
164 lines
4.3 KiB
Plaintext
# get rid of that stupid cache mechanism
|
|
rm -f config.cache
|
|
|
|
AC_INIT(configure.in)
|
|
AC_CANONICAL_BUILD
|
|
AC_CANONICAL_HOST
|
|
AC_ISC_POSIX
|
|
AM_INIT_AUTOMAKE(eet, 0.9.10.041)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_PROG_CC
|
|
AM_PROG_CC_STDC
|
|
AC_HEADER_STDC
|
|
AC_C_CONST
|
|
AM_ENABLE_SHARED
|
|
AM_PROG_LIBTOOL
|
|
AC_FUNC_ALLOCA
|
|
|
|
AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
|
|
AC_CHECK_HEADER(jpeglib.h,, AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
|
|
|
|
AC_CHECK_HEADERS(netinet/in.h)
|
|
|
|
winsock_libs=""
|
|
create_shared_lib=""
|
|
case "$host_os" in
|
|
mingw|mingw32)
|
|
winsock_libs="-lwsock32"
|
|
create_shared_lib="-no-undefined "
|
|
;;
|
|
esac
|
|
|
|
AC_SUBST(winsock_libs)
|
|
AC_SUBST(create_shared_lib)
|
|
|
|
AC_CHECK_HEADER(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file]))
|
|
|
|
fnmatch_libs=""
|
|
AC_CHECK_FUNCS(fnmatch, res=yes, res=no)
|
|
if test "x$res" = "xno"; then
|
|
AC_CHECK_LIB(fnmatch, fnmatch, res=yes fnmatch_libs="-lfnmatch", res=no)
|
|
dnl Test for compilation with MinGW.
|
|
dnl fnmatch function is in the libiberty library
|
|
if test "x$res" = "xno"; then
|
|
AC_CHECK_LIB(iberty, fnmatch, res=yes fnmatch_libs="-liberty", res=no)
|
|
fi
|
|
if test "x$res" = "xno"; then
|
|
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty])
|
|
fi
|
|
fi
|
|
|
|
AC_SUBST(fnmatch_libs)
|
|
|
|
dnl These are needed for fmemopen/open_memstream
|
|
AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
|
|
AC_DEFINE(__USE_GNU, , [Enable GNU extensions])
|
|
|
|
AC_CHECK_FUNCS(fmemopen open_memstream realpath)
|
|
|
|
dnl Check whether the null pointer is zero on this arch
|
|
AC_MSG_CHECKING([value of the null pointer])
|
|
AC_TRY_RUN([
|
|
#include <stdlib.h>
|
|
int main (int argc, char **argv) {
|
|
void *foo = NULL;
|
|
int bar = (int)foo;
|
|
return (int)foo;
|
|
}
|
|
], AC_MSG_RESULT([yes]), [
|
|
AC_MSG_RESULT([no])
|
|
AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
|
|
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
|
|
)
|
|
|
|
AC_MSG_CHECKING([OS libc C99 '%a' support])
|
|
AC_TRY_RUN([
|
|
#include <stdio.h>
|
|
int main(int argc, char **argv) {
|
|
char buf[4096];
|
|
float ival = 0.1234, oval = 0.0;
|
|
snprintf(buf, sizeof(buf), "%a", (double)ival);
|
|
sscanf(buf, "%a", &oval);
|
|
if (ival != oval) return -1;
|
|
return 0;
|
|
}
|
|
], AC_MSG_RESULT([yes]), [
|
|
AC_MSG_RESULT([no])
|
|
AC_MSG_ERROR([Unsupported Operating System!
|
|
Your OS does not support C99's '%a' string format. Eet cannot function without
|
|
it. Please contact your OS vendor to get updates for C99 '%a' floating point
|
|
format read/write support or change operating systems for one with support
|
|
for an already very old standard. (Linux is known to support this, as is
|
|
Solaris 10)])
|
|
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming C99 '%a' support is OK])
|
|
)
|
|
|
|
if test "x${bindir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
|
|
else
|
|
PACKAGE_BIN_DIR="${prefix}/bin"
|
|
fi
|
|
else
|
|
PACKAGE_BIN_DIR="${bindir}"
|
|
fi
|
|
AC_SUBST(PACKAGE_BIN_DIR)
|
|
|
|
if test "x${libdir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
|
|
else
|
|
PACKAGE_LIB_DIR="${prefix}/lib"
|
|
fi
|
|
else
|
|
PACKAGE_LIB_DIR="${libdir}"
|
|
fi
|
|
AC_SUBST(PACKAGE_LIB_DIR)
|
|
|
|
if test "x${prefix}" = "xNONE"; then
|
|
PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
|
|
else
|
|
PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
|
|
fi
|
|
AC_SUBST(PACKAGE_DATA_DIR)
|
|
|
|
#AM_CHECK_DOXYGEN()
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
eet.pc
|
|
eet.c
|
|
src/Makefile
|
|
src/lib/Makefile
|
|
README
|
|
eet.spec
|
|
debian/changelog
|
|
])
|
|
|
|
|
|
#####################################################################
|
|
## Info
|
|
|
|
echo
|
|
echo
|
|
echo
|
|
echo "------------------------------------------------------------------------"
|
|
echo "$PACKAGE $VERSION"
|
|
echo "------------------------------------------------------------------------"
|
|
echo
|
|
echo "Configuration Options Summary:"
|
|
echo
|
|
#echo " Build documentation..: $BUILD_DOCS"
|
|
#echo
|
|
echo " Compilation..........: make"
|
|
echo
|
|
echo " Installation.........: make install"
|
|
echo
|
|
echo " prefix.........: $prefix"
|
|
echo " binaries.......: $bindir"
|
|
echo " libraries......: $libdir"
|
|
echo " headers........: $includedir"
|
|
#echo " documentation..: $datadir/$PACKAGE/doc"
|
|
echo
|