# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([skonfig-c],[0.1],[skonfig@dtnr.ch],[],[http://www.skonfig.li/]) AC_CONFIG_SRCDIR([src/skonfig.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_FILES([Makefile]) AM_INIT_AUTOMAKE([subdir-objects]) # Checks for programs. AC_LANG([C]) AC_PROG_CC # autoconf 2.70 obsoletes AC_PROG_CC_C99 and includes it in AC_PROG_CC m4_version_prereq([2.70],[],[AC_PROG_CC_C99]) AC_PROG_CPP AC_PROG_MAKE_SET # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_HEADER_STDBOOL AC_CHECK_HEADERS([sys/stat.h]) AC_HEADER_STAT AC_CHECK_HEADERS([stdarg.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_C_RESTRICT AC_C_STRINGIZE # AC_C_VARARRAYS AC_TYPE_SIZE_T AC_TYPE_UINT8_T # Checks for library functions. AC_CHECK_FUNCS_ONCE([getenv getpwuid stat strncpy strncat]) # Add debug support AC_ARG_ENABLE( [debug], AS_HELP_STRING([--enable-debug], [enable debugging, default: no]), [case ${enableval} in (yes) debug=true ;; (no) debug=false ;; (*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac], [debug=false]) AM_CONDITIONAL(DEBUG, [test "x${debug}" = xtrue]) AM_COND_IF(DEBUG, AC_DEFINE(DEBUG, 1, [Define to 0 if this is a release build]), AC_DEFINE(DEBUG, 0, [Define to 1 or higher if this is a debug build])) # Defines AC_DEFINE(DIRSEP, [/], [The directory separator in a file system path]) AC_DEFINE(PATHSEP, [:], [The separator of PATH components]) # Check if shebangs are supported on this system. # This is required for execution of types. AC_SYS_INTERPRETER if test "x${interpval}" != 'xyes' then AC_MSG_ERROR([cannot run types on this system because it does not support shebangs.]) fi AC_OUTPUT