⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 Modem通讯程序包
💻 IN
字号:
## $Id: configure.in,v 1.28 1998/02/17 09:51:48 mdejonge Exp $##   $Source: /home/mdejonge/CVS/projects/modem/configure.in,v $# $Revision: 1.28 $#    Author: Merijn de Jonge#     Email: mdejonge@wins.uva.nl#### This file is part of the modem communication package.# Copyright (C) 1996-1998  Merijn de Jonge# # This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.###dnl Process this file with autoconf to produce a configure script.AC_INIT(modem_defs.h)AC_CONFIG_HEADER(config.h)# Where are wetopdir=`pwd`AC_SUBST(topdir)# determine widget set (motif, tcl/tk or xt) to use# ui=motifAC_ARG_WITH(motif,[  --with-motif            Use motif widget set (default)], ui=motif;location=$withval)AC_ARG_WITH(tk,   [  --with-tk               Use Tcl/Tk widget set],ui=tk;location=$withval)AC_ARG_WITH(xt,   [  --with-xt               Use XT widget set], ui=xt; location=$withval)AC_ARG_WITH(text, [  --with-text             Use textual interface (no dialogs)], ui=text; location=$withval)dnl Checks for programs.AC_ISC_POSIXAC_PROG_CCAC_PROG_CPPAC_PROG_INSTALLAC_PROG_LEXAC_PROG_LN_SAC_PROG_MAKE_SETAC_PROG_YACCAC_PROG_RANLIBif test $ui = motif; then   AC_DEFINE(USE_MOTIF)   UI=motif   UI_LIBS="-lXm -lXt -lXext -lX11"   # on some systems motif requires linking with libXpm   AC_CHECK_LIB(Xpm,XmCreateCommand,UI_LIBS="$UI_LIBS -lXpm",,$UI_LIBS -L/usr/X11R6/lib)elif test $ui = tk; then   AC_MSG_CHECKING(Location of Tcl/Tk library)   AC_DEFINE(USE_TK)   UI=tk# locate tcl/tk libraries   # When location is not specified we use default search path.   if test $location = "yes"; then      dirs="/ /usr /usr/local /usr/X11 /usr/openwin"   else   # otherwise, we only look in specified location      dirs=$location   fi   # find tk library in search path and use highest version number   for d in $dirs   do      found1=`ls $d/lib/libtk*.* 2>/dev/null |\              grep "libtk[[0-9]]*\.*[[0-9]]*\." | sort | tail -1`      l1=`basename /$found1`      l2=`basename /$found`      f=`(echo $l1 ; echo $l2) | sort | tail -1`      if test "a$f" = "a$l1"; then         found=$found1      fi   done   if test "a$found" = "a"; then      echo >&2      AC_MSG_ERROR(*** No Tcl/Tk library found)   fi      location=`dirname $found`   location=`dirname $location`  ;# Strip /lib from location   tk_lib=`basename $found`   # strip possible .a or .so extension   tk_version=`basename $tk_lib .a`   tk_version=`basename $tk_version .so`   tk_version=`echo $tk_version | cut -b6-`      # Determine correct tcl library for tk_lib   case $tk_version in      4.0 ) tk=tk4.0; tcl=tcl7.4 ;;      4.1 ) tk=tk4.1; tcl=tcl7.5 ;;      4.2 ) tk=tk4.2; tcl=tcl7.6 ;;      *   ) tk=tk$tk_version; tcl=tcl$tk_version ;;   esac   UI_LIBS="-l$tk -l$tcl -lX11"   AC_MSG_RESULT($location/lib ($tk_version))elif test $ui = xtthen   AC_DEFINE(USE_XT)   UI=xt   UI_LIBS="-lXaw -lXt -lXmu  -lXext -lX11"elif test $ui = textthen   AC_DEFINE(USE_TEXT)   UI=textelse   AC_MSG_ERROR(*** Incorrect ui specified: $ui)fiif test "a$location" != "ayes"; then   UI_LIBS="-L$location/lib $UI_LIBS"   UI_INCLUDES="-I$location/include"fidnl Checks for libraries.# ordinary librariesAC_CHECK_LIB(dl, dlopen)AC_CHECK_LIB(m, atan2)AC_CHECK_LIB(nsl, dial)dnl Replace `main' with a function in -lsocket:AC_CHECK_LIB(socket, socket,,nsl)AC_PATH_XTRAdnl Checks for header files.AC_HEADER_STDCAC_HEADER_SYS_WAITAC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h unistd.h)AC_CHECK_HEADER(getopt.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_PID_TAC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TMAC_TYPE_UID_Tdnl Checks for library functions.AC_PROG_GCC_TRADITIONALAC_TYPE_SIGNALAC_FUNC_STRFTIMEAC_FUNC_VPRINTFAC_CHECK_FUNCS(gethostname mkdir putenv select socket strdup strtol)################### Check for basename functionAC_MSG_CHECKING(basename)AC_TRY_LINK([#include <string.h>],[    basename( NULL );], test_ok=yes, test_ok=no)if test $test_ok = yes; then   AC_DEFINE(HAS_BASENAME)fiAC_MSG_RESULT($test_ok)################### Check for vsnprintf functionAC_MSG_CHECKING(vsnprintf)AC_TRY_LINK([#include <stdio.h>#include <stdarg.h>],[va_list ap;   char buf[512];   vsnprintf( buf,  sizeof(buf), "testing", ap );], test_ok=yes, test_ok=no)if test $test_ok = yes; then   AC_DEFINE(HAS_VSNPRINTF)fiAC_MSG_RESULT($test_ok)############################## test for atexit functionAC_MSG_CHECKING(atexit)AC_TRY_LINK([#include <stdlib.h>],[atexit(NULL);],test_ok=yes, test_ok=no)if test $test_ok = yes; then   AC_DEFINE(HAS_ATEXIT)fiAC_MSG_RESULT($test_ok)################################ test for setenv functionAC_MSG_CHECKING(setenv)AC_TRY_LINK([#include <stdlib.h>],[setenv( "var1", "value", 0);], test_ok=yes, test_ok=no)if test $test_ok = yes; then   AC_DEFINE(HAS_SETENV)fiAC_MSG_RESULT($test_ok)################################ test for grantpt functionAC_MSG_CHECKING(grantpt)AC_TRY_LINK([#include <stdlib.h>],[grantpt(0);], test_ok=yes, test_ok=no)if test $test_ok = yes; then   AC_DEFINE(HAS_GRANTPT)fiAC_MSG_RESULT($test_ok)################################ test whether printf accepts %m formatAC_MSG_CHECKING(printf accepts '%m')AC_TRY_RUN([#include <stdio.h>#include <string.h>int main(){   char buf[512];   sprintf( buf, "%m" );   if( strcmp( buf, "m" ) == 0 )      return 1;   return 0;}],test_ok=yes,test_ok=no,test_ok=no)if test $test_ok = yes; then   AC_DEFINE(PRINTF_HAS_M_FORMAT)fiAC_MSG_RESULT($test_ok)################################### Checking whether machine byte ordering of current machineAC_MSG_CHECKING(Checking byte ordering of machine)AC_TRY_RUN([int main(){   union {      int i;      char c[sizeof(int)];   } byteordering;   byteordering.i = 0;   byteordering.c[0] = 1;   if( byteordering.i == 1 )      exit( 0 );   exit( 1 );}], test_ok="Little Endian", test_ok="Big Endian", test_oK="Unknown" )if test "$test_ok" = "Big Endian"; then   AC_DEFINE(BIG_ENDIAN)elif test "$testok" = "Unknown" ; then      AC_MSG_ERROR(*** Can't determine byte ordering of this machine.)fiAC_MSG_RESULT("$test_ok")################ find location of app-default files# We check all directories listed below. The first directory# that exists will be used to store app-defaults files.AC_MSG_CHECKING([locating app-defaults directory])appdefaultsdir=for d in \   /usr/X11/lib/app-defaults \   /usr/lib/X11/app-defaults \   /usr/openwin/lib/app-defaultsdo   if test -d $d; then      appdefaultsdir=$d      break;   fidoneif test "a$appdefaultsdir" = "a" -a "$UI" != "text" ; then   echo >&2   AC_MSG_ERROR(*** no app-defaults found; is X11 installed?)fiAC_MSG_RESULT([$appdefaultsdir])AC_SUBST(appdefaultsdir)# system dependent stuffAC_MSG_CHECKING([system and version])system=`uname -s`-`uname -r`if test "$?" -ne 0 ; then   AC_MSG_RESULT([unknown (can't find uname command)])   system=unknownelse   AC_MSG_RESULT($system)fi# Define system dependent CFLAGS SYS_DEFS and LDFLAGS here.case $system in   HP-UX* ) CFLAGS="$CFLAGS -Ae"             SYS_DEFS="$SYS_DEFS -D_POSIX_SOURCE -D_HPUX_SOURCE"      ;;   Linux* )      ;;   SunOS* )      ;;esacAC_SUBST(UI)AC_SUBST(UI_LIBS)AC_SUBST(UI_INCLUDES)AC_SUBST(CFLAGS)AC_SUBST(SYS_DEFS)AC_SUBST(LDFLAGS)AC_OUTPUT(libport/Makefile  liberror/Makefile     libprotocol/Makefile \          libconf/Makefile  libphonebook/Makefile libtty/Makefile \          libmodem/Makefile libtcpip/Makefile     libmclient/Makefile \          libhelp/Makefile  libui/Makefile        libui/motif/Makefile \          libui/xt/Makefile libui/tk/Makefile     libui/text/Makefile \	  modemd/Makefile   modemtalk/Makefile    getitem/Makefile \	  tests/Makefile    modemlogin/Makefile   modemcontrol/Makefile \	  scripts/Makefile  make.config           library_target \	  program_target    Makefile)

⌨️ 快捷键说明

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