nsf / gothic

Tcl/Tk Go bindings

Repository from Github https://github.comnsf/gothicRepository from Github https://github.comnsf/gothic

Add OpenBSD compatability

jreut opened this issue · comments

diff --git a/interpreter.go b/interpreter.go
index b78503f..41548ab 100644
--- a/interpreter.go
+++ b/interpreter.go
@@ -1,11 +1,12 @@
 package gothic
 
 /*
-#cgo !tcl85 LDFLAGS: -ltcl8.6 -ltk8.6
-#cgo !tcl85 CFLAGS: -I/usr/include/tcl8.6
+#cgo !tcl85,!openbsd LDFLAGS: -ltcl8.6 -ltk8.6
+#cgo !tcl85,!openbsd CFLAGS: -I/usr/include/tcl8.6
 #cgo tcl85 LDFLAGS: -ltcl8.5 -ltk8.5
 #cgo tcl85 CFLAGS: -I/usr/include/tcl8.5
 #cgo darwin tcl85 CFLAGS: -I/opt/X11/include
+#cgo openbsd pkg-config: tcl86 tk86 x11
 
 #include "interpreter.h"
 */
% pkg-config --cflags --libs tk86 tcl86 x11
-I/usr/local/include/tk8.6 -I/usr/local/include/tcl8.6 -I/usr/X11R6/include -L/usr/local/lib -L/usr/X11R6/lib -ltk86 -ltkstub86 -ltcl86 -ltclstub86 -lz -lX11 -lxcb -lXau -lXdmcp