Make compileable on Ubuntu and docu for Ubuntu

Ubuntu has different package names that need to be documented separtely.
Ubuntu requires exec_prefix in the libtpms.pc file for pkg-config to work.
Rework some of the configure.ac parts.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2014-12-15 22:10:07 -05:00
parent 9acd053d6d
commit 03d25ba067
3 changed files with 32 additions and 12 deletions

12
INSTALL
View File

@ -51,17 +51,29 @@ openssl.
To build for openssl, the following development packages must have been
installed:
Fedora/RedHat:
- glibc-headers
- openssl-devel
Ubuntu:
- libc6-dev
- libssl-dev
To build for freebl, the following development packages must have been
installed prior to compilation:
Fedora/RedHat:
- glibc-headers
- nss-softokn-freebl-devel (preferably version 3.12.9-2 or newer)
- nss-softokn-devel (preferably version 3.12.9-2 or newer)
- gmp-devel
Ubuntu:
- libc6-dev
- libgmp-dev
- libnspr4-dev
- libnss3-dev (preferably version 3.17.2; needs to have blapi.h)
By default, libtpms is built with the openssl crypto library, which was
shown above. To build with the freebl crypto library the following command
line can be used:

View File

@ -64,7 +64,8 @@ AC_ARG_WITH([openssl],
[AES_set_encrypt_key],
[],
AC_MSG_ERROR(Faulty openssl crypto library))
AC_CHECK_HEADERS([openssl/aes.h])
AC_CHECK_HEADERS([openssl/aes.h],[],
AC_MSG_ERROR(Is openssl-devel/libssl-dev installed?))
AC_MSG_RESULT([Building with openssl crypto library])
cryptolib=openssl
]
@ -80,21 +81,26 @@ freebl)
CFLAGS_save=$CFLAGS
CFLAGS="$CFLAGS $(nspr-config --cflags)"
if test $? -ne 0; then
AC_MSG_ERROR(Could not find nspr-config. Is nspr-devel installed?)
fi
AC_CHECK_HEADERS([nspr4/plbase64.h],[],
AC_MSG_ERROR(You must install nspr-devel))
AC_CHECK_HEADERS([gmp.h],[],
AC_MSG_ERROR(gmp-devel/libgmp-dev is bad))
CFLAGS="$CFLAGS $(nss-config --cflags)"
CFLAGS="$(nspr-config --cflags)"
if test $? -ne 0; then
AC_MSG_ERROR(Could not find nss-config. Is nss-devel installed?)
AC_MSG_ERROR(Could not find nspr-config. Is nspr-devel/libnspr4-dev installed?)
fi
AC_CHECK_HEADERS([nss3/ssl.h],[],
AC_MSG_ERROR(You must install nss-devel))
CPPFLAGS=$CFLAGS
AC_CHECK_HEADERS([plbase64.h],[],
AC_MSG_ERROR(You must install nspr-devel/libnspr4-dev))
CFLAGS=$CFLAGS_save
CFLAGS="$(nss-config --cflags) $CFLAGS"
if test $? -ne 0; then
AC_MSG_ERROR(Could not find nss-config. Is nss-devel/libnss3-dev installed?)
fi
CPPFLAGS="$CPPFLAGS $CFLAGS"
AC_CHECK_HEADERS([sslerr.h],[],
AC_MSG_ERROR(nss-devel/libnss3-dev is bad))
CFLAGS="$CFLAGS_save $CFLAGS"
;;
openssl)
AM_CONDITIONAL(LIBTPMS_USE_FREEBL, false)

View File

@ -1,3 +1,5 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=@includedir@