[Libreoffice] [PATCH] Use the correct db includes and obey LDFLAGS

Robert Nagy robert at openbsd.org
Fri Nov 5 04:25:44 PDT 2010


A little bit more explanation:

On OpenBSD there is a db.h in /usr/include which is not sleepycat db4,
and of course it gets picked up and the compile test fails.

On (2010-11-05 12:22), Robert Nagy wrote:
> ---
>  configure.in |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/configure.in b/configure.in
> index aab3995..6f72931 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -4368,11 +4368,16 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \
>      test "$with_system_db" != "no"; then
>      SYSTEM_DB=YES
>      AC_MSG_RESULT([external])
> -    AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
> +    if test "$_os" = "OpenBSD" ; then
> +        DBDIR=/usr/local/include/db4
> +    else
> +        DBDIR=/usr/include/db4
> +    fi
> +    CFLAGS=-I$DBDIR
> +    AC_CHECK_HEADER(db4/db.h, [ DB_INCLUDES=$DBDIR ],
>          [
> -             CFLAGS=-I/usr/include/db4
> -             AC_CHECK_HEADER(db4/db.h,
> -             [ DB_INCLUDES=/usr/include/db4 ],
> +             AC_CHECK_HEADER(db.h,
> +             [ DB_INCLUDES=/usr/include ],
>               [ AC_MSG_ERROR(no. install the db4 libraries) ], []+             )
>          ], []
>      )
> @@ -5383,7 +5388,7 @@ elif test "$_os" != "WINNT" ; then
>        AC_MSG_ERROR([No X includes found]) # Exit
>     fi
>     CFLAGS=$X_CFLAGS
> -   LDFLAGS="$X_LDFLAGS $X_LIBS"
> +   LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
>     AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
>     dnl Check if the XauDisposeAuth symbol is provided by libXau.
>     AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
> -- 
> 1.7.3.1
> 
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice


More information about the LibreOffice mailing list