Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernisation of the macro call "AC_INIT" #4664

Closed
michaelrsweet opened this issue Jul 12, 2015 · 6 comments
Closed

Modernisation of the macro call "AC_INIT" #4664

michaelrsweet opened this issue Jul 12, 2015 · 6 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.1b1
CUPS.org User: elfring

The macro call "AC_INIT" was specified with the commit "Load cups into easysw/current" (ef416fc) in the build script "configure.in" on 2006-01-13.
This call variant became obsolete.

How do you think about to pass more parameters there?
http:https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Initializing-configure.html

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Hmm, not sure when the AC_INIT parameters changed; will review the documentation for the minimum supported version and make a decision.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

OK, looks like 2.69 uses the new syntax, so I'll make the necessary changes to 2.1 (but not to 2.0).

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str4664.patch":

Index: config-scripts/cups-common.m4

--- config-scripts/cups-common.m4 (revision 12784)
+++ config-scripts/cups-common.m4 (working copy)
@@ -13,18 +13,26 @@
dnl file is missing or damaged, see the license at "http:https://www.cups.org/".
dnl

-dnl We need at least autoconf 2.60...

-AC_PREREQ(2.60)

dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)

dnl Version number information...
-CUPS_VERSION="2.1rc1"
-CUPS_REVISION=""
-#if test -z "$CUPS_REVISION" -a -d .svn; then
-# CUPS_REVISION="-rsvnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'"
-#fi
+CUPS_VERSION="AC_PACKAGE_VERSION"
+
+case "$CUPS_VERSION" in

  • *svn)

  •   if test -z "$CUPS_REVISION" -a -d .svn; then
    
  •       CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
    
  •   else
    
  •       CUPS_REVISION=""
    
  •   fi
    
  •   ;;
    
  • *)

  •   CUPS_REVISION=""
    
  •   ;;
    

    +esac
    +
    CUPS_BUILD="cups-$CUPS_VERSION"

    AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
    @@ -33,8 +41,8 @@
    AC_SUBST(CUPS_VERSION)
    AC_SUBST(CUPS_REVISION)
    AC_SUBST(CUPS_BUILD)
    -AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION$CUPS_REVISION")
    -AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "CUPS/$CUPS_VERSION$CUPS_REVISION")
    +AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION")
    +AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION")

    dnl Default compiler flags...
    CFLAGS="${CFLAGS:=}"

    Index: configure.ac

    --- configure.ac (revision 12783)
    +++ configure.ac (working copy)
    @@ -3,7 +3,7 @@
    dnl
    dnl Configuration script for CUPS.
    dnl
    -dnl Copyright 2007-2014 by Apple Inc.
    +dnl Copyright 2007-2015 by Apple Inc.
    dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
    dnl
    dnl These coded instructions, statements, and computer programs are the
    @@ -13,8 +13,12 @@
    dnl file is missing or damaged, see the license at "http:https://www.cups.org/".
    dnl

-AC_INIT(cups/cups.h)
+dnl We need at least autoconf 2.60...
+AC_PREREQ(2.60)

+dnl Package name and version...
+AC_INIT([CUPS], [2.1rc1])
+
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
sinclude(config-scripts/cups-directories.m4)

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: elfring

How do you think about pass also the address "https://www.cups.org/str.ph" as the third parameter there?

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fair enough, added the bug tracker and home page URLs...

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant