Skip to content
Snippets Groups Projects
Commit 7fbc8e3c authored by Claus-Justus Heine's avatar Claus-Justus Heine
Browse files

Convert - to _ in variable names.

parent dc107f80
No related branches found
No related tags found
No related merge requests found
...@@ -27,10 +27,10 @@ AC_ARG_WITH($1-lib, ...@@ -27,10 +27,10 @@ AC_ARG_WITH($1-lib,
;; ;;
no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument") no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument")
;; ;;
*) $1_LIB_PATH=$withval *) m4_bpatsubst([$1],-,_)_LIB_PATH=$withval
;; ;;
esac], esac],
$1_LIB_PATH=$DEFAULT_LIBDIR) m4_bpatsubst([$1],-,_)_LIB_PATH=$DEFAULT_LIBDIR)
dnl dnl
dnl now for the header file dnl now for the header file
dnl dnl
...@@ -47,53 +47,53 @@ AC_ARG_WITH($1-headers, ...@@ -47,53 +47,53 @@ AC_ARG_WITH($1-headers,
;; ;;
no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument") no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument")
;; ;;
*) $1_INCLUDE_PATH=$withval *) m4_bpatsubst([$1],-,_)_INCLUDE_PATH=$withval
;; ;;
esac], esac],
$1_INCLUDE_PATH=$DEFAULT_INCDIR) m4_bpatsubst([$1],-,_)_INCLUDE_PATH=$DEFAULT_INCDIR)
dnl dnl
dnl now check if the library and header files exist dnl now check if the library and header files exist
dnl dnl
if test "$7" = "optional" ; then if test "$7" = "optional" ; then
AC_CHECK_LIB($2, main, AC_CHECK_LIB($2, main,
[$1_LIB="-L$$1_LIB_PATH -l$2"], [m4_bpatsubst([$1],-,_)_LIB="-L${m4_bpatsubst([$1],-,_)_LIB_PATH} -l$2"],
[$1_LIB="" [m4_bpatsubst([$1],-,_)_LIB=""
$1_LIB_PATH="" m4_bpatsubst([$1],-,_)_LIB_PATH=""
$1_INCLUDE_PATH=""], m4_bpatsubst([$1],-,_)_INCLUDE_PATH=""],
-L$$1_LIB_PATH $4) -L${m4_bpatsubst([$1],-,_)_LIB_PATH} $4)
else else
AC_CHECK_LIB($2, main, AC_CHECK_LIB($2, main,
[$1_LIB="-L$$1_LIB_PATH -l$2 $4"], [m4_bpatsubst([$1],-,_)_LIB="-L${m4_bpatsubst([$1],-,_)_LIB_PATH} -l$2 $4"],
[AC_MSG_ERROR([Library "lib$2" was not found])], [AC_MSG_ERROR([Library "lib$2" was not found])],
-L$$1_LIB_PATH $4) -L$m4_bpatsubst([$1],-,_)_LIB_PATH $4)
fi fi
if test "x$$1_LIB" = "x" ; then if test "x${m4_bpatsubst([$1],-,_)_LIB}" = "x" ; then
: :
else else
dnl dnl
dnl check for the header file dnl check for the header file
dnl dnl
ac_$1_save_CPPFLAGS="$CPPFLAGS" [ac_]m4_bpatsubst([$1],-,_)_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$$1_INCLUDE_PATH $CPPFLAGS" CPPFLAGS="-I${m4_bpatsubst([$1],-,_)_INCLUDE_PATH} $CPPFLAGS"
if test "$7" = "optional" ; then if test "$7" = "optional" ; then
AC_CHECK_HEADERS($5,, [$1_LIB="" AC_CHECK_HEADERS($5,, [m4_bpatsubst([$1],-,_)_LIB=""
$1_LIB_PATH="" m4_bpatsubst([$1],-,_)_LIB_PATH=""
$1_INCLUDE_PATH=""]) m4_bpatsubst([$1],-,_)_INCLUDE_PATH=""])
else else
AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found])) AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found]))
fi fi
CPPCLAGS="$ac_$1_save_CPPFLAGS" CPPCLAGS="${[ac_]m4_bpatsubst([$1],-,_)_save_CPPFLAGS}"
dnl dnl
dnl define makefile substitutions and config.h macros dnl define makefile substitutions and config.h macros
dnl dnl
if test "x$$1_LIB" = "x" ; then if test "x${m4_bpatsubst([$1],-,_)_LIB}" = "x" ; then
: :
else else
AC_DEFINE(m4_bpatsubst(m4_toupper([HAVE_LIB$2]),-,_), AC_DEFINE(m4_bpatsubst(m4_toupper([HAVE_LIB$2]),-,_),
1, Define to 1 if you have lib$2) 1, Define to 1 if you have lib$2)
fi fi
fi fi
AC_SUBST($1_INCLUDE_PATH) AC_SUBST(m4_bpatsubst([$1],-,_)_INCLUDE_PATH)
AC_SUBST($1_LIB_PATH) AC_SUBST(m4_bpatsubst([$1],-,_)_LIB_PATH)
AC_SUBST($1_LIB) AC_SUBST(m4_bpatsubst([$1],-,_)_LIB)
]) ])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment