AC_INIT AC_CONFIG_SRCDIR([src/pac_main.cc]) AC_CANONICAL_SYSTEM AC_CONFIG_AUX_DIR(.) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(binpac, esyscmd([tr -d '\n' < VERSION])) dnl Commands for funkier shell output: BLD_ON=`./shtool echo -n -e %B` BLD_OFF=`./shtool echo -n -e %b` dnl ################################################ dnl # Checks for programs dnl ################################################ AM_PROG_LEX AC_PROG_YACC AC_PROG_CXX AC_PROG_RANLIB AC_PROG_INSTALL m4_ifdef([AC_COMPUTE_INT], [], [AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])]) AC_COMPUTE_INT([SIZEOF_UNSIGNED_INT], [sizeof(unsigned int)]) AC_SUBST(SIZEOF_UNSIGNED_INT) AC_ARG_ENABLE(debug, [ --enable-debug no compiler optimizations], debug="yes" CFLAGS="-DDEBUG `echo $CFLAGS | sed -e 's/-O2//'`" CXXFLAGS="-DDEBUG `echo $CXXFLAGS | sed -e 's/-O2//'`", debug="no") AC_C_BIGENDIAN( AC_DEFINE(WORDS_BIGENDIAN,1,[whether words are stored with the most significant byte first]) dnl This is intentionally named differently so as to not collide with WORDS_BIGENDIAN HOST_BIGENDIAN="#define HOST_BIGENDIAN 1" AC_SUBST(HOST_BIGENDIAN)) AC_CONFIG_FILES([ Makefile src/Makefile lib/Makefile lib/binpac.h ]) AC_OUTPUT echo echo " "${BLD_ON}"Binpac Configuration Summary"${BLD_OFF} echo "==========================================================" echo echo " - Debugging enabled: "${BLD_ON}$debug${BLD_OFF} echo exit 0