Using gpc port
Mikhail T.
mi at aldan.algebra.com
Sun Oct 30 06:24:53 PST 2005
Hi!
Below is a patch to build OOo with the already installed gpc.
It patches "configure.in" and thus may be suitable for submitting to
OOo.
The current OOo ports do not (re-)run automake, so you'll have to patch
the configure instead.
A short-cut may be to simply patch poly2.cxx to always include gpc.h
Yours,
-mi
--- tools/source/generic/poly2.cxx Fri Sep 9 10:22:13 2005
+++ tools/source/generic/poly2.cxx Tue Oct 25 18:12:40 2005
@@ -39,5 +39,9 @@
{
#if defined (HAVE_GPC_H) && !defined (__gpc_h)
+# if !defined(SYSTEM_GPC)
# include <external/gpc/gpc.h>
+# else
+# include <gpc.h>
+# endif
#else
# ifdef HAVE_LIBART_H
--- tools/source/generic/makefile.mk Fri Sep 9 10:21:42 2005
+++ tools/source/generic/makefile.mk Tue Oct 25 18:34:47 2005
@@ -48,4 +48,7 @@
.IF "$(WITH_GPC)"!="NO"
CDEFS+=-DHAVE_GPC_H
+.IF "$(SYSTEM_GPC)"=="YES"
+CDEFS+=-DSYSTEM_GPC
+.ENDIF
.ENDIF
.IF "$(WITH_LIBART)"!="NO"
--- config_office/configure.in Wed Oct 5 06:19:55 2005
+++ config_office/configure.in Tue Oct 25 17:08:32 2005
@@ -3741,28 +3741,18 @@
elif test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
WITH_GPC=YES
+ SYSTEM_GPC=YES
AC_MSG_RESULT([GPC])
- AC_MSG_CHECKING([for GPC files])
- if test -f ../external/gpc/gpc.h; then
- HAVE_GPC_H="yes"
- else
- HAVE_GPC_H="no"
- fi
- if test -f ../external/gpc/gpc.c; then
- HAVE_GPC_C="yes"
- else
- HAVE_GPC_C="no"
- fi
-
- if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
- AC_MSG_RESULT([GPC files found])
- else
- AC_MSG_ERROR([GPC files not found
-ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
-or install libart and use --enable-libart])
- fi
+ AC_CHECK_HEADER(gpc.h, [],
+ [ AC_MSG_ERROR(gpc.h headers not found.)], [])
+ AC_CHECK_LIB(gpc, gpc_read_polygon, [],
+ [ AC_MSG_ERROR(gpc library not found.)], [])
+ HAVE_GPC_H="yes"
+ AC_MSG_RESULT([GPC files found])
else
+ SYSTEM_GPC=NO
AC_MSG_RESULT([internal])
fi
+AC_SUBST(SYSTEM_GPC)
AC_SUBST(WITH_LIBART)
AC_SUBST(LIBART_CFLAGS)
--- config_office/set_soenv.in Tue Oct 25 17:59:01 2005
+++ config_office/set_soenv.in Tue Oct 25 18:29:42 2005
@@ -1702,4 +1734,5 @@
ToFile( "VC_STANDARD", "@VC_STANDARD@", "e" );
ToFile( "WITH_GPC", "@WITH_GPC@", "e" );
+ToFile( "SYSTEM_GPC", "@SYSTEM_GPC@", "e" );
ToFile( "WITH_LIBART", "@WITH_LIBART@", "e" );
ToFile( "LIBART_CFLAGS", "@LIBART_CFLAGS@", "e" );
--- external/gpc/makefile.mk Tue Sep 6 10:21:34 2005
+++ external/gpc/makefile.mk Tue Oct 25 18:31:32 2005
@@ -47,5 +47,5 @@
# --- Files --------------------------------------------------------
-.IF "$(WITH_GPC)"!="NO"
+.IF "$(WITH_GPC)"!="NO" && "$(SYSTEM_GPC)"!="YES"
SLOFILES = $(SLO)$/gpc.obj
More information about the freebsd-openoffice
mailing list