From owner-freebsd-questions@FreeBSD.ORG Wed Jul 9 17:25:21 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DE96106566B for ; Wed, 9 Jul 2008 17:25:21 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 586F48FC13 for ; Wed, 9 Jul 2008 17:25:21 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from seis.bris.ac.uk ([137.222.10.93]) by dirj.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1KGdPn-00047T-98 for freebsd-questions@freebsd.org; Wed, 09 Jul 2008 18:25:20 +0100 Received: from mech-cluster238.men.bris.ac.uk ([137.222.187.238]) by seis.bris.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1KGdPm-0006Bv-N1 for freebsd-questions@freebsd.org; Wed, 09 Jul 2008 18:25:15 +0100 Received: from mech-cluster238.men.bris.ac.uk (localhost.men.bris.ac.uk [127.0.0.1]) by mech-cluster238.men.bris.ac.uk (8.14.2/8.14.2) with ESMTP id m69HPDLl051308 for ; Wed, 9 Jul 2008 18:25:13 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster238.men.bris.ac.uk (8.14.2/8.14.2/Submit) id m69HPDO0051307 for freebsd-questions@freebsd.org; Wed, 9 Jul 2008 18:25:13 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster238.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Wed, 9 Jul 2008 18:25:13 +0100 From: Anton Shterenlikht To: freebsd-questions@freebsd.org Message-ID: <20080709172513.GA51206@mech-cluster238.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.4 X-Spam-Level: - Subject: snippet of configure script - explain please X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2008 17:25:21 -0000 I get errors building ports/graphviz on FBSD 6.3 on alpha. It seems the error is due to configure script erroneously deciding that there is no strncasecmp function on OS. Based on config.log: configure:9333: result: no configure:9253: checking for strncasecmp I think the following configure snippet is to blame. Could somebody explain, at least in general terms, what this piece of code does. many thanks anton 9249 9250 for ac_func in strcasecmp strncasecmp 9251 do 9252 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9253 { echo "$as_me:$LINENO: checking for $ac_func" >&5 9254 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9255 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9256 echo $ECHO_N "(cached) $ECHO_C" >&6 9257 else 9258 cat >conftest.$ac_ext <<_ACEOF 9259 /* confdefs.h. */ 9260 _ACEOF 9261 cat confdefs.h >>conftest.$ac_ext 9262 cat >>conftest.$ac_ext <<_ACEOF 9263 /* end confdefs.h. */ where as_tr_sh : 549 # Sed expression to map a string onto a valid variable name. 550 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" as_cr_alnum : 40 as_cr_alnum=$as_cr_Letters$as_cr_digits as_me : 132 # Name of the executable. 133 as_me=`$as_basename -- "$0" || ECHO_N and ECHO_C : 474 ECHO_C= ECHO_N= ECHO_T= 475 case `echo -n x` in 476 -n*) 477 case `echo 'x\c'` in 478 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 479 *) ECHO_C='\c';; 480 esac;; 481 *) 482 ECHO_N='-n';; 483 esac -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 928 8233 Fax: +44 (0)117 929 4423