dnl Process this file with autoconf to produce a configure script. AC_INIT(attr.c) AC_CONFIG_AUX_DIR(../config) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(rig, 0.1) dnl Checks for programs. AC_PROG_AWK AC_PROG_CC AC_MSG_CHECKING(for host compiler) if test "x$BUILD_CC" != x; then # User set it. AC_MSG_RESULT([$BUILD_CC]) CC=$BUILD_CC elif test "$host" = "$target"; then BUILD_CC='${CC}' AC_MSG_RESULT([native, using target compiler]) else [rig_host=`echo "$host" | sed 's/[^a-zA-Z0-9_]/_/g'`] AC_CACHE_VAL(rig_cv_${rig_host}_CC, [ dnl ac_word="${host_alias}-gcc" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then eval rig_cv_${rig_host}_CC='$ac_word' break fi done IFS="$ac_save_ifs"]) eval BUILD_CC=\"\$rig_cv_${rig_host}_CC\" if test "x$BUILD_CC" = x; then AC_MSG_RESULT([${host_alias}-gcc not found]) BUILD_CC='${CC}' AC_MSG_WARN([using target compiler ($CC) for host $host]) else AC_MSG_RESULT([${BUILD_CC}]) CC=$BUILD_CC fi fi AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_YACC AM_PROG_LEX dnl Checks for libraries. dnl Replace `main' with a function in -lfl: AC_CHECK_LIB(fl, main) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T dnl Checks for library functions. AC_CHECK_FUNCS(strdup strtol) AC_OUTPUT(Makefile)