aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-30 05:37:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-30 05:37:43 +0000
commitf46689f68ff14275c3758bea5c726877cb8000fd (patch)
tree6f0d11488fe27d38d530b7aae3c9f180aca151ce
parent6706c97368cad3bd368af9a5b9870a02b4fa2e2e (diff)
downloadruby-f46689f68ff14275c3758bea5c726877cb8000fd.tar.gz
* configure.in (ruby_pc): erase runtime-defined variables and
check if generated pc file is valid. * template/ruby.pc.in (DEFFILE): need for mingw. * template/ruby.pc.in (LIBRUBY): fix the order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--configure.in20
-rw-r--r--template/ruby.pc.in4
3 files changed, 29 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e5bccd9e13..4a9d1ab7fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sat Oct 30 14:37:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (ruby_pc): erase runtime-defined variables and
+ check if generated pc file is valid.
+
+ * template/ruby.pc.in (DEFFILE): need for mingw.
+
+ * template/ruby.pc.in (LIBRUBY): fix the order.
+
Sat Oct 30 11:33:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/Makefile.sub (ruby_pc): ignore missing variables.
diff --git a/configure.in b/configure.in
index 73e7c138e2..b85b3421bd 100644
--- a/configure.in
+++ b/configure.in
@@ -359,6 +359,11 @@ AC_SUBST(MAKEDIRS)
AC_CHECK_TOOL(DOT, dot)
AC_CHECK_TOOL(DOXYGEN, doxygen)
+AC_CHECK_TOOL(PKG_CONFIG, pkg-config)
+if test -n "$PKG_CONFIG"; then
+ $PKG_CONFIG --print-errors --version > /dev/null 2>&1 || PKG_CONFIG=
+fi
+
# checks for UNIX variants that set C preprocessor variables
AC_USE_SYSTEM_EXTENSIONS
@@ -2811,10 +2816,19 @@ ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"
AC_SUBST(ruby_pc)
AC_CONFIG_FILES($ruby_pc:template/ruby.pc.in,
[
- sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g'] $ruby_pc > ruby.pc.tmp &&
- mv -f ruby.pc.tmp $ruby_pc
+ if sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g;s/@[A-Za-z_][A-Za-z0-9_]*@//'] $ruby_pc > ruby.tmp.pc &&
+ {
+ test -z "$PKG_CONFIG" ||
+ PKG_CONFIG_PATH=. $PKG_CONFIG --print-errors ruby.tmp
+ }
+ then
+ mv -f ruby.tmp.pc $ruby_pc
+ else
+ rm ruby.tmp.pc $ruby_pc
+ exit 1
+ fi
],
- [ruby_pc='$ruby_pc'])
+ [ruby_pc='$ruby_pc' PKG_CONFIG='$PKG_CONFIG'])
AC_OUTPUT
dnl }
diff --git a/template/ruby.pc.in b/template/ruby.pc.in
index 58beda4fbf..c2dcaa3eb4 100644
--- a/template/ruby.pc.in
+++ b/template/ruby.pc.in
@@ -11,10 +11,11 @@ RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
+DEFFILE=@DEFFILE@
LIBPATH=@LIBPATH@
-LIBRUBY=@LIBRUBY@
LIBRUBY_A=@LIBRUBY_A@
LIBRUBY_SO=@LIBRUBY_SO@
+LIBRUBY=@LIBRUBY@
LIBRUBYARG_SHARED=@LIBRUBYARG_SHARED@
LIBRUBYARG_STATIC=@LIBRUBYARG_STATIC@
LIBRUBYARG=@LIBRUBYARG@
@@ -30,6 +31,7 @@ sitearch=@sitearch@
Name: Ruby
Description: Object Oriented Script Language
Version: ${ruby_version}
+URL: http://www.ruby-lang.org
Cflags: -I${rubyhdrdir}/${arch} -I${rubyhdrdir}
Libs: ${DLDFLAGS} ${LIBRUBYARG_SHARED} ${LIBS}
Requires: