declarations look like this:
@smallexample
-(extern (* GtkWidget) @r{; gtk+-2.4.0/gtk/gtkwindow.h}
+(extern (* GtkWidget)
gtk_window_new
(type GtkWindowType))
-(typedef GtkWindowType @r{; gtk+-2.4.0/gtk/gtkenums.h}
+(typedef GtkWindowType
(enum
(GTK_WINDOW_TOPLEVEL)
(GTK_WINDOW_POPUP)))
build-example: prhello-shim.so prhello-types.bin prhello-const.bin
prhello-shim.so: prhello-shim.o
- $(CC) -shared -fPIC -o $@ $^ `pkg-config --libs gtk+-2.0`
+ $(CC) -shared -fPIC -o $@ $^ `pkg-config --libs gtk+-3.0`
prhello-shim.o: prhello-shim.c
- $(CC) -I../lib -Wall -fPIC `pkg-config --cflags gtk+-2.0` -o $@ -c $<
+ $(CC) -I../lib -Wall -fPIC `pkg-config --cflags gtk+-3.0` -o $@ -c $<
prhello-shim.c prhello-const.c prhello-types.bin: prhello.cdecl
(echo "(load-option 'FFI)"; \
prhello-const: prhello-const.o
@rm -f $@
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --libs gtk+-2.0`
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --libs gtk+-3.0`
prhello-const.o: prhello-const.c
- $(CC) `pkg-config --cflags gtk+-2.0` $(CFLAGS) -o $@ -c $<
+ $(CC) `pkg-config --cflags gtk+-3.0` $(CFLAGS) -o $@ -c $<
@end verbatim
@end example
elif test "${with_gtk}" = "no"; then
AC_MSG_RESULT([by request... no])
elif test "${with_gtk}" = "auto"; then
- if pkg-config --exists gtk+-2.0 2>/dev/null; then
+ if pkg-config --exists gtk+-3.0 2>/dev/null; then
AC_MSG_RESULT([yes])
with_gtk=yes
else
- AC_MSG_RESULT([no Gtk 2.0... no])
+ AC_MSG_RESULT([no Gtk 3.0... no])
with_gtk=no
fi
fi