On 11.05.2013 16:32, Allan McRae wrote:
diff --git a/configure.ac b/configure.ac index 81bc1b3..ac629f9 100644 --- a/configure.ac +++ b/configure.ac @@ -97,6 +97,11 @@ AC_ARG_WITH(buildscript, AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]), [BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
+# Help line for buildscript filename +AC_ARG_WITH(makepkg-template-dir, + AS_HELP_STRING([--with-makepkg-template-dir=name], [set the template dir used by makepkg-template]), + [TEMPLATE_DIR=$withval], [TEMPLATE_DIR=/usr/share/makepkg-template]) + # Help line for debug package suffix AC_ARG_WITH(debug-suffix, AS_HELP_STRING([--with-debug-suffix=name], [set the suffix for split debugging symbol packages used by makepkg]), @@ -166,6 +171,16 @@ AC_PROG_INSTALL AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false]) AC_PATH_PROGS([BASH_SHELL], [bash bash4], [false])
+# check for perl 5.10.1 (needed by makepkg-template) +AC_PATH_PROG([PERL],[perl]) +AC_DEFUN([AX_PROG_PERL_VERSION], + [AC_CACHE_CHECK([for Perl version $1 or later], [ax_cv_prog_perl_version], + [AS_IF(["$PERL" -e 'require v$1;' >/dev/null 2>&1], + [ax_cv_prog_perl_version=yes], + [ax_cv_prog_perl_version=no])]) + AS_IF([test x"$ax_cv_prog_perl_version" = xyes], [$2], [$3])])
Indented with reckless abandon...
Looks wrong here because of noet sw=2 ts=2. I've changed it to spaces.
I'd just use the ax_prog_perl_version.m4 from autoconf-archive (which looks more robust) and put it in our m4 directory.
ax_prog_perl_version.m4 from autoconf-archive is actually less robust since it parses the output of perl --version. "require v<version>" is perl code that checks if your perl is >= that version and will always error and exit != 0 if it isn't.
[lots of style fixes]
All applied.
+ (default: use specified version in the template markers) + --template-dir <dir> dir to search for templates (default: @TEMPLATE_DIR@)
s/dir/directory/ - unless the line goes over 80 characters.
Changed it and moved the default one line down so it's less likely to wrap.