fi
AM_CONDITIONAL(WITH_SHARP, [test "x$use_sharp" = "xYes"])
+dnl -----------------------------------
+dnl INCLUDES and LIBS for GO
+
+AC_ARG_ENABLE(go,
+ [AS_HELP_STRING([--enable-go=no],[go language bindings])],
+ [], [enable_go=no])
+
+if test "x$enable_go" != "xyes"; then
+ use_go="No (disabled by default - experimental)"
+else
+ if test "x$use_swig" != "xYes"; then
+ use_go="No (swig not available)"
+ else
+ if test `$SWIG -help 2>&1 | $GREP -c '\-go* *- Generate'` = 0 ; then
+ use_go="No (swig does not support -go option)"
+ else
+ AC_CHECK_PROG(GO,6g,8g)
+ if test "x$GO" = "x"; then
+ use_go="No (GO compiler not available)"
+ else
+ GO_INCLUDES=
+# GO_INSTALL_DIR="/usr/lib${LIBPOSTFIX}/go/modules"
+# GO_INSTALL_DATADIR="/usr/share/go"
+ GO_LIBS=
+# save_CPPFLAGS=$CPPFLAGS
+# CPPFLAGS="$CPPFLAGS $GO_INCLUDES"
+# AC_CHECK_HEADER(go.h,,[
+# use_go="No (missing header)"
+# GO=
+# ])
+# CPPFLAGS=$save_CPPFLAGS
+ if test "x$GO" != "x"; then
+ use_go="Yes"
+# AC_SUBST(GO_INSTALL_DATADIR)
+# AC_SUBST(GO_INSTALL_DIR)
+ AC_SUBST(GO_INCLUDES)
+ AC_SUBST(GO_LIBS)
+ fi
+ fi
+ fi
+ fi
+fi
+AM_CONDITIONAL(WITH_GO, [test "x$use_go" = "xYes"])
+
dnl -----------------------------------
dnl INCLUDES and LIBS for GUILE
echo ""
echo "language extensions:"
echo " gv_sharp: $use_sharp"
+echo " gv_go: $use_go"
echo " gv_guile: $use_guile"
echo " gv_io: $use_io"
echo " gv_java: $use_java"
## Process this file with automake to produce Makefile.in
pkgsharpdir = $(pkglibdir)/sharp
+pkggodir = $(pkglibdir)/go
pkgguiledir = $(pkglibdir)/guile
pkgiodir = $(pkglibdir)/io
pkgjavadir = $(pkglibdir)/java
# has installed a system copy
uninstall-hook:
rm -rf $(DESTDIR)$(pkgsharpdir);
+ rm -rf $(DESTDIR)$(pkggodir);
rm -rf $(DESTDIR)$(pkgguiledir);
rm -rf $(DESTDIR)$(pkgiodir);
rm -rf $(DESTDIR)$(pkgjavadir);
gv_sharp.cpp: gv.i
$(SWIG) -c++ -csharp -namespace gv -o gv_sharp.cpp $(srcdir)/gv.i
+pkggodir = $(pkglibdir)/go
+GO_data =
+nodist_libgv_go_la_SOURCES = gv_go.cpp $(GO_data)
+libgv_go_la_SOURCES = $(BASESOURCES) gv_dummy_init.c
+libgv_go_la_LIBADD = $(BASELIBS) $(GO_LIBS)
+libgv_go_la_LDFLAGS = -module -avoid-version
+libgv_go_la_CPPFLAGS = $(BASECPPFLAGS) $(GO_INCLUDES)
+$(GO_data): gv_go.cpp
+gv_go.cpp: gv.i
+ $(SWIG) -c++ -go -o gv_go.cpp $(srcdir)/gv.i
+
pkgguiledir = $(pkglibdir)/guile
GUILE_data =
nodist_libgv_guile_la_SOURCES = gv_guile.cpp $(GUILE_data)
pkgsharp_LTLIBRARIES = libgv_sharp.la
DEVTSTS += test_sharp
endif
+if WITH_GO
+pkggo_DATA = $(GO_data)
+man_MANS += gv.3go
+pdf_DATA += gv.3go.pdf
+pkggo_LTLIBRARIES = libgv_go.la
+DEVTSTS += test_go
+endif
if WITH_GUILE
pkgguile_DATA = $(GUILE_data)
man_MANS += gv.3guile
endif
endif
-man = gv.3sharp gv.3guile gv.3io gv.3java gv.3lua gv.3ocaml \
+man = gv.3sharp gv.3go gv.3guile gv.3io gv.3java gv.3lua gv.3ocaml \
gv.3perl gv.3php gv.3python gv.3r gv.3ruby gv.3tcl
-pdf = gv.3sharp.pdf gv.3guile.pdf gv.3io.pdf gv.3java.pdf gv.3lua.pdf \
+pdf = gv.3sharp.pdf gv.3go.pdf gv.3guile.pdf gv.3io.pdf gv.3java.pdf gv.3lua.pdf \
gv.3ocaml.pdf gv.3perl.pdf gv.3php.pdf gv.3python.pdf gv.3r.pdf \
gv.3ruby.pdf gv.3tcl.pdf
gv.3sharp.pdf: gv.3sharp
- $(GROFF) -Tps -man gv.3sharp | $(PS2PDF) - - >gv.3sharp.pdf
+gv.3go.pdf: gv.3go
+ - $(GROFF) -Tps -man gv.3go | $(PS2PDF) - - >gv.3go.pdf
+
gv.3guile.pdf: gv.3guile
- $(GROFF) -Tps -man gv.3guile | $(PS2PDF) - - >gv.3guile.pdf
uninstall-hook:
rm -rf $(DESTDIR)$(pkgsharpdir);
+ rm -rf $(DESTDIR)$(pkggodir);
rm -rf $(DESTDIR)$(pkgguiledir);
rm -rf $(DESTDIR)$(pkgiodir);
rm -rf $(DESTDIR)$(pkgjavadir);
$(SHARP) *.cs -out:test.exe; \
mono test.exe)
+.PHONY: test_go
+test_go: libgv_go.la
+ -(mkdir -p test_go; cd test_go; \
+ ln -fs ../.libs/libgv_go.so libgv.so; \
+ ln -fs ../$(srcdir)/*.dot ../$(srcdir)/*.go .; \
+ $(GO) *.go
+ LD_LIBRARY_PATH=. go test)
+
.PHONY: test_guile
test_guile: libgv_guile.la
-(mkdir -p test_guile; cd test_guile; \
CLEANFILES = test_*/* pkgIndex.tcl \
gv_sharp.cpp $(SHARP_data) \
+ gv_go.cpp $(GO_data) \
gv_guile.cpp $(GUILE_data) \
gv_io.cpp $(IO_data) \
gv_java.cpp $(JAVA_data) \
USAGE {
}
}
+ go {
+ TYPES {
+ {Agraph_t* g} graph_handle
+ {Agraph_t* sg} subgraph_handle
+ {Agnode_t* n} node_handle
+ {Agnode_t* t} tail_node_handle
+ {Agnode_t* h} head_node_handle
+ {Agedge_t* e} edge_handle
+ {Agsym_t* a} attr_handle
+ {char* gne} type
+ {char* name} name
+ {char* tname} tail_name
+ {char* hname} head_name
+ {char* attr} attr_name
+ {char* val} attr_value
+ {const char* filename} filename
+ {char* engine} engine
+ {char* string} string
+ {char** outdata} outdata
+ {char* format} format
+ {FILE* f} channel
+ {void** data} data_handle
+ Agraph_t* graph_handle
+ Agnode_t* node_handle
+ Agedge_t* edge_handle
+ Agsym_t* attribute_handle
+ char* string
+ {const char*} string
+ char** outdata
+ FILE* channel
+ bool bool
+ int int
+ void** data_handle
+ void {}
+ }
+ SYNTAX {
+ gv. ( {, } {);}
+ }
+ SYNOPSIS {
+ }
+ USAGE {
+ }
+ }
guile {
TYPES {
{Agraph_t* g} graph_handle