Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure change: use pkg-config (PKG_CONFIG) #520

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.sunos64x64/squeak.cog.spur/build/mvm
Expand Up @@ -23,14 +23,16 @@ n|no|N|NO) echo "ok but this isn't safe!!";;
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
test -f config.h || ../../../platforms/unix/config/configure x86_64-pc-solaris2.11\
--without-npsqueak \
--with-vmversion=5.0 \
--without-libtls \
--disable-dynamicopenssl \
--with-src=spur64src \
TARGET_ARCH="-m64" \
CFLAGS="$CFLAGS" \
LIBS="$LIBS" \
PKG_CONFIG_PATH=/usr/lib/64/pkgconfig \
LDFLAGS="$LDFLAGS"
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
3 changes: 2 additions & 1 deletion build.sunos64x64/squeak.stack.spur/build/mvm
Expand Up @@ -18,13 +18,14 @@ n|no|N|NO) echo "ok but this isn't safe!!";;
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure \
test -f config.h || ../../../platforms/unix/config/configure x86_64-pc-solaris2.11 \
--with-vmversion=5.0 \
--without-libtls \
--disable-dynamicopenssl \
--with-src=spurstack64src --disable-cogit \
--without-vm-display-fbdev --without-npsqueak \
TARGET_ARCH="-m64" \
PKG_CONFIG_PATH=/usr/lib/64/pkgconfig \
CFLAGS="$OPT"
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 2 additions & 0 deletions platforms/unix/config/make.cfg.in
Expand Up @@ -95,6 +95,8 @@ X_CFLAGS= @X_CFLAGS@
X_INCLUDES= @X_INCLUDES@
X_LIBS= @X_LIBS@

UNICODE_PLUGIN_LIBS= @UNICODE_PLUGIN_LIBS@
UNICODE_PLUGIN_CFLAGS= @UNICODE_PLUGIN_CFLAGS@

INTERP= @INTERP@

Expand Down
5 changes: 3 additions & 2 deletions platforms/unix/plugins/UnicodePlugin/Makefile.inc
@@ -1,2 +1,3 @@
XCPPFLAGS= -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include
XLDFLAGS= -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lglib-2.0
XCPPFLAGS=$(UNICODE_PLUGIN_CFLAGS)
XLDFLAGS=$(UNICODE_PLUGIN_LIBS)

21 changes: 20 additions & 1 deletion platforms/unix/plugins/UnicodePlugin/README.UnicodePlugin
@@ -1 +1,20 @@
In order to build the Unicode plugin on Linux, you'll need a collection of Pango, Cairo, and glib header and library files. These can often be found in the GTK+ development package in the package repository for your version of Linux.
In order to build the Unicode plugin, you'll need a collection of Pango, Cairo, and glib header and library files. These can often be found in the GTK+ development package in the package repository for your operating system.

The location of the header files can be a problem.

A possible approach is to use 'pkg-config' reducing the problem

# pkg-config --cflags glib-2.0

For example a system may have:

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

while a different system (or a 64bit version of the same system) may have:

-I/usr/include/glib-2.0 -I/usr/lib/amd64/glib-2.0/include

Unfortunately pkg-config could perhaps have its own problems ...

In that case configure can be ran with "UNICODE_PLUGIN_CFLAGS" manually set.

19 changes: 7 additions & 12 deletions platforms/unix/plugins/UnicodePlugin/acinclude.m4
@@ -1,12 +1,7 @@
# -*- sh -*-

AC_MSG_CHECKING([for PangoCairo libraries])
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include"
AC_TRY_COMPILE([#include <pango/pangocairo.h>],[{}],[
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_PLUGIN_DISABLE
])
CPPFLAGS="$save_CPPFLAGS"
# -*- sh -*-

PKG_CHECK_MODULES(UNICODE_PLUGIN,[glib-2.0 pangocairo],,AC_PLUGIN_DISABLE)

AC_SUBST(UNICODE_PLUGIN_CFLAGS)
AC_SUBST(UNICODE_PLUGIN_LIBS)