📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(qadsl, 1.3.0, [https://savannah.gnu.org/bugs/?group=qadsl])dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)AM_CONFIG_HEADER(include/settings.h)AC_CONFIG_SRCDIR(configure.in)dnl Every other copy of the package version number gets its value from hereAM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)AC_SUBST(VERSION)ISODATE=`date +%Y-%m-%d`AC_SUBST(ISODATE)AC_CANONICAL_HOSTdnl Checks for programs.AC_PROG_INSTALLAC_PROG_CCAM_PROG_LEXAC_PROG_YACCdnl Checks for libraries.AC_PROG_RANLIBAC_ARG_ENABLE(debug, [ --enable-debug Enable debugging with GDB [default=no]],[CFLAGS="-Wall -pedantic -g -DDEBUG -DYYERROR_VERBOSE"],[CFLAGS="-O2"LDFLAGS="-s"])dnl Checks for standard header files:dnl ANSI C header files, sys/types.h, sys/stat.h, stdlib.h, string.h,dnl memory.h, strings.h, inttypes.h, stdint.h, unistd.hAC_HEADER_STDCdnl Check for qadsl specific includesAC_CHECK_HEADERS(errno.h netdb.h stdio.h)dnl jm_CHECK_TYPE_STRUCT_UTIMBUFdnl AC_HEADER_MAJORdnl AC_FUNC_ALLOCAAC_STRUCT_TMdnl AC_STRUCT_ST_BLOCKSdnl AC_FUNC_CLOSEDIR_VOIDAH_TOP([/* settings.h - Created by configure */#ifndef __SETTINGS_H__#define __SETTINGS_H__])AH_BOTTOM([#endif /* __SETTINGS_H__ */])AH_VERBATIM([_GNU_SOURCE], [/* Enable GNU extensions on systems that have them. */#ifndef _GNU_SOURCE# define _GNU_SOURCE#endif])dnl Look for implementations for these:AC_CHECK_FUNCS()dnl dnl XXX - Much of these fine checks are taken from QuakeForge.netdnl dnl Checks for stricmp/strcasecmpAC_CHECK_FUNC(strcasecmp, strcasecmp=yes, strcasecmp=no)if test $strcasecmp = no; then AC_CHECK_FUNC(stricmp, AC_DEFINE(strcasecmp, stricmp, [Define strcasecmp as stricmp if you have one but not the other]), AC_MSG_ERROR([Neither stricmp nor strcasecmp found]) )fidnl Checks for typedefs, structures, and compiler characteristics.dnl Checks for library functions.dnl Check for various --with-??? directivesdefault_globalconf="/etc/${PACKAGE}.conf"AC_ARG_WITH(global-cfg,[qADSL Features: --with-global-cfg=FILE If set will change the name and location of the global configuration file used by qADSL. Defaults to /etc/qadsl.conf],globalconf="$withval", globalconf="auto")if test "x$globalconf" = "xauto" || test "x$globalconf" = "xyes" || \ test "x$globalconf" = "xno"; then dnl yes/no sanity checks globalconf="$default_globalconf"fiAC_DEFINE_UNQUOTED(GLOBAL_CONF, "$globalconf", [Define this to the location of the global config file])default_userconf="~/.${PACKAGE}rc"AC_ARG_WITH(user-cfg,[ --with-user-cfg=FILE If set will change the name and location of the user-specific configuration file used by qADSL. Defaults to ~/.qadslrc],userconf="$withval", userconf="auto")if test "x$userconf" = "xauto" || test "x$userconf" = "xyes" || \ test "x$userconf" = "xno"; then dnl yes/no sanity checks userconf="$default_userconf"fiAC_DEFINE_UNQUOTED(USER_CONF, "$userconf", [Define this to the location of the user config file])default_pidfile="/var/run/qadsl.pid"AC_ARG_WITH(pidfile,[ --with-pidfile=FILE If set will change the name and location of the file used by qADSL to store the PID of its daemon process. Defaults to /var/run/qadsl.pid],pidfile="$withval", pidfile="auto")if test "x$pidfile" = "xauto" || test "x$pidfile" = "xyes" || \ test "x$pidfile" = "xno"; then dnl yes/no sanity checks pidfile="$default_pidfile"fiAC_DEFINE_UNQUOTED(PID_FILE, "$pidfile", [Define this to the location of the user config file])default_port=80AC_ARG_WITH(port,[ --with-port=NUMBER Set the HTTP port number, defaults to standard port 80.],port="$withval", port="auto")if test "x$port" = "xauto" || test "x$port" = "xyes" || \ test "x$port" = "xno"; then dnl yes/no sanity checks port="$default_port"fiAC_DEFINE_UNQUOTED(PORT, "$port", [Define this to the HTTP port number.])dnl XXX - These should be removed ASAP! /JoachimAC_DEFINE(MAXDATASIZE, 4091, [I am a hack, please send patch to remove me.])AC_DEFINE(MAXLEN, 256, [I am a hack, please send patch to remove me.])dnl Create all the makefiles and stuffAC_OUTPUT([ Makefile qadsl.lsm qadsl.spec lib/Makefile lib/conf/Makefile src/Makefile etc/Makefile man/Makefile])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -