Commit 89f74f52 authored by Marc-André Lureau's avatar Marc-André Lureau

gnome-autogen: infer PKG_NAME from configure.ac

Let's not repeat ourself in autogen.sh, there are already many places
with the package name.

https://bugzilla.gnome.org/show_bug.cgi?id=741891
parent 1ced4ff7
......@@ -13,8 +13,6 @@ script in your module that looks something like this:
srcdir=`dirname $0`
[ -z "$srcdir" ] && srcdir=.
PKG_NAME=mypackage
if [ ! -f "$srcdir/configure.ac" ]; then
echo "$srcdir doesn't look like source directory for $PKG_NAME" >&2
exit 1
......
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
#name of package
test "$PKG_NAME" || PKG_NAME=Package
test "$srcdir" || srcdir=.
# default version requirements ...
......@@ -47,6 +45,8 @@ printerr() {
echo "$@" >&2
}
PKG_NAME=`autoconf --trace "AC_INIT:$1" "$srcdir/configure.ac"`
# Usage:
# compare_versions MIN_VERSION ACTUAL_VERSION
# returns true if ACTUAL_VERSION >= MIN_VERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment