File: libbash.m4

package info (click to toggle)
libbash 0.9.11-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 776 kB
  • sloc: sh: 1,402; makefile: 53
file content (15 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dnl AC_CHECK_LIBBASH
dnl Checks whether ldbash exists and then checks whether
dnl required libbash libraries are installed.
dnl If either ldbash or required libraries are missing - throws AC_MSG_ERROR.
dnl Example: AC_CHECK_LIBBASH([getopts hashstash])
AC_DEFUN([AC_CHECK_LIBBASH],[
	AC_PATH_PROG([LDBASH], [ldbash])
	[[ "X$LDBASH" == "X" ]] && AC_MSG_ERROR([libbash is not found!])
	AC_FOREACH([BASH_LIB],[$1],[
		AC_MSG_CHECKING([whether `m4_defn([BASH_LIB])' libbash library is listed]) && \
						 $LDBASH -l | grep -q m4_defn([BASH_LIB]) && \
						 echo yes || \
						 AC_MSG_ERROR([m4_defn([BASH_LIB]) not found!])
	])
])