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

Use $1_LIB_PATH and $1_INCLUDE_PATH to be a little bit more consistent

with stock ALBERT.
parent 9fe4c751
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_DIR=$withval *) $1_LIB_PATH=$withval
;; ;;
esac], esac],
$1_DIR=$DEFAULT_LIBDIR) $1_LIB_PATH=$DEFAULT_LIBDIR)
dnl dnl
dnl now for the header file dnl now for the header file
dnl dnl
...@@ -50,22 +50,22 @@ AC_ARG_WITH($1-headers, ...@@ -50,22 +50,22 @@ AC_ARG_WITH($1-headers,
*) $1_INCS=$withval *) $1_INCS=$withval
;; ;;
esac], esac],
$1_INCLUDES=$DEFAULT_INCDIR) $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_DIR -l$2"], [$1_LIB="-L$$1_LIB_PATH -l$2"],
[$1_LIB="" [$1_LIB=""
$1_DIR="" $1_LIB_PATH=""
$1_INCLUDES=""], $1_INCLUDE_PATH=""],
-L$$1_DIR $4) -L$$1_LIB_PATH $4)
else else
AC_CHECK_LIB($2, main, AC_CHECK_LIB($2, main,
[$1_LIB="-L$$1_DIR -l$2 $4"], [$1_LIB="-L$$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_DIR $4) -L$$1_LIB_PATH $4)
fi fi
if test "x$$1_LIB" = "x" ; then if test "x$$1_LIB" = "x" ; then
: :
...@@ -74,11 +74,11 @@ else ...@@ -74,11 +74,11 @@ else
dnl check for the header file dnl check for the header file
dnl dnl
ac_$1_save_CPPFLAGS="$CPPFLAGS" ac_$1_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$$1_INCLUDES $CPPFLAGS" CPPFLAGS="-I$$1_INCLUDE_PATH $CPPFLAGS"
if test "$7" = "optional" ; then if test "$7" = "optional" ; then
AC_CHECK_HEADERS($5,, [$1_LIB="" AC_CHECK_HEADERS($5,, [$1_LIB=""
$1_DIR="" $1_LIB_PATH=""
$1_INCLUDES=""]) $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
...@@ -92,7 +92,7 @@ else ...@@ -92,7 +92,7 @@ else
AC_DEFINE(m4_toupper([HAVE_LIB$2]), 1, Define to 1 if you have lib$2) AC_DEFINE(m4_toupper([HAVE_LIB$2]), 1, Define to 1 if you have lib$2)
fi fi
fi fi
AC_SUBST($1_INCLUDES) AC_SUBST($1_INCLUDE_PATH)
AC_SUBST($1_DIR) AC_SUBST($1_LIB_PATH)
AC_SUBST($1_LIB) AC_SUBST($1_LIB)
]) ])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment