File: ruby.m4

package info (click to toggle)
geos 3.4.2-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,572 kB
  • ctags: 13,989
  • sloc: cpp: 97,030; xml: 32,337; sh: 10,379; ansic: 3,726; php: 1,831; makefile: 1,619; ruby: 1,295; python: 928
file content (77 lines) | stat: -rw-r--r-- 3,080 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
## ------------------------       
## Ruby file handling
## From Charlie Savage
## ------------------------
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.


AC_DEFUN([AC_RUBY_DEVEL],
[
	dnl Find a Ruby interpreter	
  AC_PATH_PROG([RUBY],[ruby])
  
  if test -z "$RUBY" ; then
		AC_MSG_ERROR([Could not find ruby interpreter.])
    RUBY=''
  else
		dnl Get Ruby version number
		RUBY_VERSION=`$RUBY -e "puts RUBY_VERSION"`

		dnl Get Ruby bin directory
		RUBY_BIN_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["bindir"]] || Config::CONFIG[["bindir"]]'`

    dnl Get Ruby site arch
		RUBY_SITE_ARCH=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["sitearch"]] || Config::CONFIG[["sitearch"]]'`

		dnl Get Ruby include directory
		RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]]'`
	
		dnl Get Ruby config.h include directory
		RUBY_ARCH_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyarchhdrdir"]] || Config::CONFIG[["archdir"]]'`
	
		dnl Get Ruby lib directory
		RUBY_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["libdir"]] || Config::CONFIG[["libdir"]]'`

		dnl Get Ruby arch lib directory
		RUBY_ARCH_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["archlibdir"]] || Config::CONFIG[["archlibdir"]]'`

		dnl Get Ruby extensions directory
		RUBY_EXTENSION_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["vendorarchdir"]] || Config::CONFIG[["vendorarchdir"]]'`

		dnl Get Ruby shared library name, this does not include the lib prefix or extension name
		RUBY_SO_NAME=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["LIBRUBY_SO"]] || Config::CONFIG[["RUBY_SO_NAME"]]'`
		
		dnl Get Ruby shared libary name
		RUBY_SHARED_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["LIBRUBY"]] || Config::CONFIG[["LIBRUBY"]]'`
		
    AC_MSG_NOTICE([Ruby executable is '$RUBY'])
    AC_MSG_NOTICE([Ruby version is '$RUBY_VERSION'])
    AC_MSG_NOTICE([Ruby bin directory is '$RUBY_BIN_DIR'])
    AC_MSG_NOTICE([Ruby site arch is '$RUBY_SITE_ARCH'])
    AC_MSG_NOTICE([Ruby include directory is '$RUBY_INCLUDE_DIR'])
    AC_MSG_NOTICE([Ruby config.h include directory is '$RUBY_ARCH_INCLUDE_DIR'])
    AC_MSG_NOTICE([Ruby library directory is '$RUBY_LIB_DIR'])
    AC_MSG_NOTICE([Ruby architecture library directory is '$RUBY_ARCH_LIB_DIR'])
    AC_MSG_NOTICE([Ruby extension directory is '$RUBY_EXTENSION_DIR'])
    AC_MSG_NOTICE([Ruby library is '$RUBY_SO_NAME'])
    AC_MSG_NOTICE([Ruby import library is '$RUBY_SHARED_LIB'])
   
    AC_SUBST([RUBY_VERSION])
    AC_SUBST([RUBY_BIN_DIR])
    AC_SUBST([RUBY_SITE_ARCH])
    AC_SUBST([RUBY_INCLUDE_DIR])
    AC_SUBST([RUBY_ARCH_INCLUDE_DIR])
    AC_SUBST([RUBY_LIB_DIR])
    AC_SUBST([RUBY_ARCH_LIB_DIR])
    AC_SUBST([RUBY_EXTENSION_DIR])
    AC_SUBST([RUBY_SO_NAME])
    AC_SUBST([RUBY_SHARED_LIB])
	fi
  AC_SUBST([RUBY])
])