configure.ac

来自「2009 ROBOCUP 仿真2DSERVER 源码」· AC 代码 · 共 200 行

AC
200
字号
dnl Process this file with autoconf to produce a configure script.AC_INIT([RCSSServer], 13.0.0, sserver-admin@users.sf.net, rcssserver)AC_PREREQ(2.61)#AM_INIT_AUTOMAKE([gnu 1.7.2 check-news dist-bzip2 dist-zip])AM_INIT_AUTOMAKE([gnu 1.7.2 check-news])AC_CONFIG_SRCDIR([config.h.in])AC_CONFIG_HEADERS([config.h])AC_PROG_MAKE_SETAC_PROG_AWKAC_EXEEXTAC_LANG(C++)dnl Checks for programs.AC_PROG_CCAC_PROG_CPPAC_PROG_CXXAC_PROG_INSTALLAC_PROG_LN_SAC_PROG_MAKE_SET#ACX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS"#             CFLAGS="$CFLAGS $PTHREAD_CFLAGS"#             CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"#             CC="$PTHREAD_CC"])dnl Checks for libraries.AC_CHECK_LIB([m], [cos])dnl AC_CHECK_LIB(expat, XML_Parse)#AC_CHECK_LIB([z], [deflate])AC_SUBST(GZ_LIBS)AC_CHECK_LIB([z], [deflate],             [AC_DEFINE([HAVE_LIBZ], [1],                        [Define to 1 if you have the `z' library (-lz).])              GZ_LIBS="-lz"])AC_ARG_WITH(sstream,        AS_HELP_STRING(--with-sstream,use sstream instead of strstream (default=yes)),                       use_sstream=$withval, use_sstream=yes)if test "$use_sstream" = "yes"; then   AC_CXX_HAVE_SSTREAMfidnl Checks for header files.AC_FUNC_ALLOCAAC_HEADER_STDCAC_CHECK_HEADERS([arpa/inet.h fcntl.h])AC_CHECK_HEADERS([inttypes.h libintl.h libintl.h malloc.h netdb.h])AC_CHECK_HEADERS([netinet/in.h poll.h pwd.h stddef.h stdlib.h sys/param.h])AC_CHECK_HEADERS([sys/socket.h sys/time.h sys/types.h unistd.h winsock2.h])AC_CHECK_FUNCS([memset], [], [  echo "************** ERROR ****************"  echo "Could not find memset function."  echo "Please upgrade you system"  exit 1])dnl Checks for typedefs, structures, and compiler characteristics.AC_HEADER_STDBOOLAC_C_CONSTAC_C_INLINE#AC_TYPE_INT16_T#AC_TYPE_INT32_T#AC_TYPE_INT8_T#AC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TM#AC_TYPE_UINT16_T#AC_TYPE_UINT32_T#AC_TYPE_UINT8_TAC_CHECK_TYPES([socklen_t], [], [], [#include <sys/types.h>#include <sys/socket.h>])AC_CHECK_TYPES([size_t], [], [], [#include <sys/types.h>#include <sys/socket.h>])dnl Checks for library functions.AC_FUNC_FORKAC_FUNC_MALLOCAC_FUNC_REALLOCAC_TYPE_SIGNALAC_FUNC_STRFTIMEAC_CHECK_FUNCS([floor gethostbyname gettimeofday inet_ntoa memset mkdir pow rint])AC_CHECK_FUNCS([socket sqrt strdup strerror])AC_SUBST([FLEX])AC_SUBST([FLEXFLAGS])AC_SUBST([AM_FLEXFLAGS])AC_CHECK_PROG([FLEX],              [flex],              flex)#AC_CHECK_PROG([FLEX],#              [flex],#              flex,#              $srcdir/missingflex)AM_FLEXFLAGS="-olex.yy.c"if test -z "$FLEX" ; then  AC_MSG_ERROR([    \`flex' is missing on your system.  Please install it first.]);fiAC_PROG_YACCAC_DISABLE_STATIC#AC_LIBTOOL_DLOPEN# due to a problem with libtool 1.4.2 and autoconf 2.53 and# automake 1.6.3, I need to use the following line to# enable dlopen support. I don't know how good or bad this is##AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN])# AC_LIBTOOL_WIN32_DLLAC_PROG_LIBTOOLAC_SUBST(LIBTOOL_DEPS)##LIBS="$LIBS $lt_cv_dlopen_libs"AC_ARG_VAR(SED, [name and location of sed executable.  If it is notset, it configure looks for sed in your PATH])grep "SED=" ./libtool >& /dev/nullif test "$?" -ne 0; then    AC_PATH_PROG(SED, sed)    if test -z "$SED"; then        AC_MSG_ERROR([            sed cannot be found on your system.  Please install it in            your PATH, or specify it's location to configure.  e.g.            `./configure SED=/bin/sed`], 1)    fi    mv libtool libtool.tmp    ${AWK} -v SED="$SED" '/# libtool/ \    { if( done != "true" ) { print "SED=\"" SED "\""; done = "true"; } } \    { print; }' libtool.tmp > libtool    chmod +x libtoolfiecho `pwd`mv libtool libtool.tmp${AWK} -v EGREP="${EGREP}" '/# libtool/ \{ if( done != "true" ) { print "EGREP=\"" EGREP "\""; done = "true"; } } \{ print; }' libtool.tmp > libtoolchmod +x libtoolrm -f libtool.tmpAX_BOOST_BASE([1.32.0])AX_BOOST_SYSTEMAX_BOOST_FILESYSTEMCPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"#OLDLIBS="$LIBS"#LIBS="$LIBS $BOOST_FILESYSTEM_LIB"AC_SUBST(RCSSCLIENT)AC_ARG_ENABLE(rcssclient,[  --enable-rcssclient[=ARG] build rcssclient, a sample client [ARG=yes]],if test -n $enableval; then  if test $enableval = yes; then    RCSSCLIENT=rcssclient$EXEEXT    echo enabling rcssclient  elif test $enableval = no; then    RCSSCLIENT=    echo disabling rcssclient  fifi, RCSSCLIENT=rcssclient$EXEEXT)if ! test -z "$RCSSCLIENT"; then  AC_CHECK_FUNCS([select])  AC_FUNC_SELECT_ARGTYPES#  AC_ARG_WITH(ncurses,#        AS_HELP_STRING(--with-ncurses,use ncurses for rcssclient (default=yes)),#                       use_ncurses=$withval, use_ncurses=yes)#  if test "$use_ncurses" = "yes"; then#    AC_CHECK_LIB(ncurses, initscr,[#      AC_DEFINE(HAVE_LIBNCURSES, 1, [#        "Define to 1 if you have the `ncurses' library (-lncurses)."] )      AC_ARG_VAR(RCSSCLIENT_LIBS, The libs rcssclient needs)#      RCSSCLIENT_LIBS="-lncurses"#    ])#  fifiAC_CONFIG_FILES([Makefile                rcssbase/Makefile                rcssbase/net/Makefile                rcssbase/conf/Makefile                rcssbase/gzip/Makefile                src/Makefile                src/rcsoccersim],                [test -f src/rcsoccersim && chmod +x src/rcsoccersim])AC_OUTPUT

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?