diff --git a/config.subr b/config.subr
index c31a12b..6abad1c 100644
--- a/config.subr
+++ b/config.subr
@@ -56,7 +56,7 @@ c2prog() {
config_asan() {
echo "int main (void) { return 0; }" > .config_asan.c
- if $CC $CFLAGS .config_asan.c $LDFLAGS -lasan -o /dev/null 2>/dev/null; then
+ if $LIBTOOL --tag CC --mode link $CC $CFLAGS .config_asan.c $LDFLAGS -lasan -o /dev/null 2>/dev/null; then
HAVE_ASAN=true
else
HAVE_ASAN=false
@@ -85,7 +85,7 @@ config_include() {
shift
done
echo "int main (void) { return 0; }" >> "$OUT_C"
- if ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" -o "$OUT" >/dev/null 2>&1; then
+ if $LIBTOOL --tag CC --mode link ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" -o "$OUT" >/dev/null 2>&1; then
echo "#define $1 1" >> "${CONFIG_H}"
eval "$1=Yes"
else
@@ -103,7 +103,7 @@ config_lib_have() {
OUT=".config_$NAME"
echo "/* generated by configure */" > "$OUT_C"
echo "int main (void) { return 0; }" >> "$OUT_C"
- if ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LIBS} $@ -o "$OUT"; then
+ if $LIBTOOL --tag CC --mode link ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LIBS} $@ -o "$OUT"; then
eval "HAVE_$NAME=true"
echo "HAVE_$NAME = true" >> ${CONFIG_MK}
else
@@ -120,7 +120,7 @@ config_lib() {
OUT=".config_$NAME"
echo "/* generated by configure */" > "$OUT_C"
echo "int main (void) { return 0; }" >> "$OUT_C"
- if ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LDFLAGS} ${LIBS} $@ -o "$OUT"; then
+ if $LIBTOOL --tag CC --mode link ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LDFLAGS} ${LIBS} $@ -o "$OUT"; then
LIBS="$LIBS $@"
fi
rm -f "$OUT" "$OUT_C"
@@ -131,7 +131,7 @@ config_no_undefined() {
OUT=".config_no_undefined"
echo "/* generated by configure */" > "$OUT_C"
echo "int main (void) { return 0; }" >> "$OUT_C"
- if ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LDFLAGS} -no-undefined ${LIBS} $@ -o "$OUT" >/dev/null 2>&1; then
+ if ${LIBTOOL} --tag CC --mode link ${CC} ${CPPFLAGS} ${CFLAGS} "$OUT_C" ${LDFLAGS} -no-undefined ${LIBS} $@ -o "$OUT" >/dev/null 2>&1; then
LDFLAGS="$LDFLAGS -no-undefined"
fi
rm -f "$OUT" "$OUT_C"
diff --git a/libc3/window/cairo/configure b/libc3/window/cairo/configure
index 4b1b995..390fb25 100755
--- a/libc3/window/cairo/configure
+++ b/libc3/window/cairo/configure
@@ -42,9 +42,9 @@ LDFLAGS="--shared ${LDFLAGS}"
LIBS="$LIBS -rpath ${PREFIX}/lib"
config_asan
config_gnu
+pkg_config libbsd-overlay
pkg_config cairo
pkg_config freetype2
-pkg_config libbsd-overlay
pkg_config xkbcommon
config_lib_have COCOA -framework Cocoa
config_define PREFIX "\"${PREFIX}\""
diff --git a/libc3/window/cairo/demo/.config_no_undefined.c b/libc3/window/cairo/demo/.config_no_undefined.c
new file mode 100644
index 0000000..2e12ed6
--- /dev/null
+++ b/libc3/window/cairo/demo/.config_no_undefined.c
@@ -0,0 +1,2 @@
+/* generated by configure */
+int main (void) { return 0; }
diff --git a/libc3/window/cairo/win32/demo/window_cairo_win32_demo.c b/libc3/window/cairo/win32/demo/window_cairo_win32_demo.c
index 57ddb0c..110cade 100644
--- a/libc3/window/cairo/win32/demo/window_cairo_win32_demo.c
+++ b/libc3/window/cairo/win32/demo/window_cairo_win32_demo.c
@@ -15,7 +15,7 @@
#include <cairo/cairo.h>
#include <libc3/c3.h>
#include "../../../window.h"
-#include "../../c3_window_cairo_demo.h"
+#include "../../demo/window_cairo_demo.h"
#include "../window_cairo_win32.h"
int main (int argc, char **argv)