File: acinclude.m4

package info (click to toggle)
archzoom 0.4.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,912 kB
  • ctags: 435
  • sloc: perl: 2,008; sh: 456; makefile: 123
file content (21 lines) | stat: -rw-r--r-- 497 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dnl Convenient macros, by Mikhael Goikhman (taken from fvwm-themes)

dnl mg_ARG_WITH(NAME, HELP-STRING, VAR [, DEFAULT-VALUE])
AC_DEFUN(mg_ARG_WITH, [
	AC_ARG_WITH(
		[$1],
		AS_HELP_STRING([--with-$1], [$2]),
		[$3=$withval], [$3=$4]
	)
])

dnl mg_DEFAULT_DIR_ARG(ARG, DEFAULT_VALUE)
AC_DEFUN([mg_DEFAULT_DIR_ARG], [
	var=`echo [$]$1`
	if echo "${var}NONE" | ${AWK} '/^\$|^NONE/ { exit 1 }'; then
		$1=$var
	else
		$1=$2
	fi
	case "[$]$1" in "") echo "No value for $1. Failed."; exit 1;; esac
])