Skip to content

Commit

Permalink
build: useful autoconf/automake functions, used in reach project
Browse files Browse the repository at this point in the history
  • Loading branch information
dhubler committed Nov 5, 2013
1 parent 690d751 commit 0497b3b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions config/general.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
## AC macros for general packages like OpenSSL, Xerces, etc
##

AC_DEFUN([SF_ERLANG_NEED_LIB],
[AC_ERLANG_CHECK_LIB($1, [],
[SF_MISSING_DEP([$1 was not found!])])])

AC_DEFUN([SF_NEED_PROG],
[AC_ARG_VAR([$1], [$3])dnl
if test -n "${$1}"; then
AC_MSG_CHECKING([for $2])
AC_MSG_RESULT([${$1}])
else
AC_PATH_PROG([$1], [$2], [no])
if test "x${$1}" = "xno"; then
SF_MISSING_DEP([$2 not found but required])
fi
fi
])

AC_DEFUN([CHECK_MSGFMT],
[
AC_PATH_PROG(MSGFMT,msgfmt)
Expand Down
1 change: 1 addition & 0 deletions config/utility.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ propercase = $(shell echo $(1) | sed 's/\([a-z]\)/\U\1/')
#
empty :=
space := $(empty) $(empty)
comma := ,

# work around INSTALL limitations
# 1. create directories before installing file
Expand Down

0 comments on commit 0497b3b

Please sign in to comment.