Commit 07d0a370 authored by Tom Lane's avatar Tom Lane

Make configure probe for the location of the <uuid.h> header file.

Needed to accommodate different layout on some platforms (Debian for
one).  Heikki Linnakangas
parent dbaec70c
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.529 2007/10/05 02:55:41 scrappy Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.530 2007/10/23 21:38:16 tgl Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -899,6 +899,13 @@ if test "$with_bonjour" = yes ; then ...@@ -899,6 +899,13 @@ if test "$with_bonjour" = yes ; then
AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour])]) AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour])])
fi fi
# for contrib/uuid-ossp
if test "$with_ossp_uuid" = yes ; then
AC_CHECK_HEADERS(ossp/uuid.h, [], [
AC_CHECK_HEADERS(uuid.h, [],
[AC_MSG_ERROR([header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID])])])
fi
## ##
## Types, structures, compiler characteristics ## Types, structures, compiler characteristics
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright (c) 2007 PostgreSQL Global Development Group * Copyright (c) 2007 PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.2 2007/05/15 19:47:51 adunstan Exp $ * $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.c,v 1.3 2007/10/23 21:38:16 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -14,8 +14,21 @@ ...@@ -14,8 +14,21 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/uuid.h" #include "utils/uuid.h"
/*
* There's some confusion over the location of the uuid.h header file.
* On Debian, it's installed as ossp/uuid.h, while on Fedora, or if you
* install ossp-uuid from a tarball, it's installed as uuid.h. Don't know
* what other systems do.
*/
#ifdef HAVE_OSSP_UUID_H
#include <ossp/uuid.h>
#else
#ifdef HAVE_UUID_H
#include <uuid.h> #include <uuid.h>
#else
#error OSSP uuid.h not found
#endif
#endif
/* better both be 16 */ /* better both be 16 */
#if (UUID_LEN != UUID_LEN_BIN) #if (UUID_LEN != UUID_LEN_BIN)
......
...@@ -302,6 +302,9 @@ ...@@ -302,6 +302,9 @@
/* Define to 1 if you have the `on_exit' function. */ /* Define to 1 if you have the `on_exit' function. */
#undef HAVE_ON_EXIT #undef HAVE_ON_EXIT
/* Define to 1 if you have the <ossp/uuid.h> header file. */
#undef HAVE_OSSP_UUID_H
/* Define to 1 if you have the <pam/pam_appl.h> header file. */ /* Define to 1 if you have the <pam/pam_appl.h> header file. */
#undef HAVE_PAM_PAM_APPL_H #undef HAVE_PAM_PAM_APPL_H
...@@ -562,6 +565,9 @@ ...@@ -562,6 +565,9 @@
/* Define to 1 if you have the <utime.h> header file. */ /* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H #undef HAVE_UTIME_H
/* Define to 1 if you have the <uuid.h> header file. */
#undef HAVE_UUID_H
/* Define to 1 if you have the `vsnprintf' function. */ /* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF #undef HAVE_VSNPRINTF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment