From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Narebski Subject: [RFC/PATCH 4] autoconf: Preparing the way for autodetection Date: Sat, 8 Jul 2006 23:07:09 +0200 Message-ID: <1152392836910-git-send-email-jnareb@gmail.com> References: <200607030156.50455.jnareb@gmail.com> <1152392835436-git-send-email-jnareb@gmail.com> <11523928361444-git-send-email-jnareb@gmail.com> Reply-To: Jakub Narebski Cc: Jakub Narebski X-From: git-owner@vger.kernel.org Sat Jul 08 23:07:45 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FzK1g-0003ja-Rh for gcvg-git@gmane.org; Sat, 08 Jul 2006 23:07:45 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030388AbWGHVHc (ORCPT ); Sat, 8 Jul 2006 17:07:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030391AbWGHVHb (ORCPT ); Sat, 8 Jul 2006 17:07:31 -0400 Received: from mail.fuw.edu.pl ([193.0.80.14]:61377 "EHLO mail.fuw.edu.pl") by vger.kernel.org with ESMTP id S1030388AbWGHVH2 (ORCPT ); Sat, 8 Jul 2006 17:07:28 -0400 Received: from front.fuw.edu.pl (front.fuw.edu.pl [193.0.83.59]) by mail.fuw.edu.pl (8.13.6/8.13.6) with ESMTP id k68L6noK021747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Jul 2006 23:06:49 +0200 Received: from front.fuw.edu.pl (IDENT:10582@localhost [127.0.0.1]) by front.fuw.edu.pl (8.13.3/8.12.4) with ESMTP id k68L7GAU015579; Sat, 8 Jul 2006 23:07:16 +0200 Received: (from jnareb@localhost) by front.fuw.edu.pl (8.13.3/8.12.4/Submit) id k68L7GR1015578; Sat, 8 Jul 2006 23:07:16 +0200 To: git@vger.kernel.org X-Mailer: git-send-email 1.3.0 In-Reply-To: <11523928361444-git-send-email-jnareb@gmail.com> X-Scanned-By: MIMEDefang 2.56 on 193.0.80.14 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Prepares configure.ac to output autodetected and selected (by using --with/--without and --enable/disable parameters to generated ./configure script) building configuration in "git style", i.e. by appending appropriate variables to output file config.mak.autogen (via temporary file config.mak.append). Signed-off-by: Jakub Narebski --- This series of patches tries to build _optional_ automatic build and install configuration, using existing build configuration variables, and not making changes to Makefile. Series of patches 4-8 adds automatic detection of compilation configuration (those which I could write easily). configure.ac | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6fe5013..e68d416 100644 --- a/configure.ac +++ b/configure.ac @@ -7,8 +7,19 @@ AC_INIT([git], [1.4.1], [git@vger.kernel AC_CONFIG_SRCDIR([git.c]) config_file=config.mak.autogen +config_append=config.mak.append config_in=config.mak.in +echo "# ${config_append}. Generated by configure." > "${config_append}" + + +## Definitions of macros +# GIT_CONF_APPEND_LINE(LINE) +# -------------------------- +# Append LINE to file ${config_append} +AC_DEFUN([GIT_CONF_APPEND_LINE], +[echo "$1" >> "${config_append}"])# GIT_CONF_APPEND_LINE + ## Checks for programs. # Define NO_PYTHON if you want to loose all benefits of the recursive merge. @@ -73,7 +84,7 @@ # Define NO_ACCURATE_DIFF if your diff p # a missing newline at the end of the file. -## Site configuration +## Site configuration ## --with-PACKAGE[=ARG] and --without-PACKAGE # Define NO_SVN_TESTS if you want to skip time-consuming SVN interopability # tests. These tests take up a significant amount of the total test time @@ -121,6 +132,10 @@ # # Define USE_STDEV below if you want git to care about the underlying device # change being considered an inode change from the update-cache perspective. + ## Output files -AC_CONFIG_FILES(["${config_file}":"${config_in}"]) +AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"]) AC_OUTPUT + +## Cleanup +rm -f "${config_append}" -- 1.4.0