File: configure.ac

package info (click to toggle)
java-gcj-compat 1.0.78-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 480 kB
  • ctags: 118
  • sloc: sh: 3,403; makefile: 430; python: 303; perl: 106
file content (151 lines) | stat: -rw-r--r-- 4,654 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(java-gcj-compat, 1.0.78, fitzsim@redhat.com)
AM_INIT_AUTOMAKE(1.9.2)
AC_CONFIG_SRCDIR(aot-compile)
AC_CANONICAL_HOST

if test "x${prefix}" = "xNONE"
then
  sdk_prefix=/usr
else
  sdk_prefix=$prefix
fi

AC_ARG_WITH([gcc-suffix],
            AS_HELP_STRING([--with-gcc-suffix],
                           [the GCC tool suffix (defaults to empty string)]),
            [gcc_suffix=$withval], [gcc_suffix=""])
AC_MSG_RESULT(GCC suffix: ${gcc_suffix})
AC_SUBST(gcc_suffix)

AC_ARG_WITH([arch-directory],
            AS_HELP_STRING([--with-arch-directory],
                           [the arch directory under jre/lib (defaults to auto-detect)]),
            [host_cpu=$withval], [host_cpu=""])

AC_ARG_WITH([os-directory],
            AS_HELP_STRING([--with-os-directory],
                           [the os directory under include (defaults to auto-detect)]),
            [host_os=$withval], [host_os=""])

AC_ARG_WITH([origin-name],
            AS_HELP_STRING([--with-origin-name],
                           [the JPackage origin name of this package (default is gcj${gcc_suffix}]),
            [origin_name=$withval], [origin_name=gcj${gcc_suffix}])
AC_MSG_RESULT(JPackage origin name: ${origin_name})

AC_ARG_WITH([arch-suffix],
            AS_HELP_STRING([--with-arch-suffix],
                           [the arch directory suffix (default is the empty string]),
            [arch_suffix=$withval], [arch_suffix=""])
AC_MSG_RESULT(arch suffix: ${arch_suffix})

AC_ARG_WITH([jvm-root-dir],
            AS_HELP_STRING([--with-jvm-root-dir],
                           [where to install SDK (default is ${sdk_prefix}/lib/jvm)]),
            [jvm_root_dir=$withval], [jvm_root_dir=${sdk_prefix}/lib/jvm])
AC_MSG_RESULT(JVM root installation directory: ${jvm_root_dir})

AC_ARG_ENABLE([symlinks],
              AS_HELP_STRING([--disable-symlinks],
                             [do not install tool symlinks in prefix/bin]),
              [enable_symlinks=no],
              [enable_symlinks=yes])
AM_CONDITIONAL([INSTALL_SYMLINKS], [test x${enable_symlinks} = xyes])

JAVA_VERSION=1.5.0
BUILD_VERSION=0
AC_SUBST(JAVA_VERSION)
AC_MSG_RESULT(Java version: ${JAVA_VERSION})

jre_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}/jre
sdk_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}

JAVA_HOME_DIR=${jvm_root_dir}/${jre_dir}
AC_SUBST(JAVA_HOME_DIR)
AC_MSG_RESULT(JAVA_HOME directory: ${JAVA_HOME_DIR})

SDK_BIN_DIR=${jvm_root_dir}/${sdk_dir}/bin
AC_SUBST(SDK_BIN_DIR)
AC_MSG_RESULT(SDK tools directory: ${SDK_BIN_DIR})

SDK_LIB_DIR=${jvm_root_dir}/${sdk_dir}/lib
AC_SUBST(SDK_LIB_DIR)
AC_MSG_RESULT(SDK jar directory: ${SDK_LIB_DIR})

SDK_INCLUDE_DIR=${jvm_root_dir}/${sdk_dir}/include
AC_SUBST(SDK_INCLUDE_DIR)
AC_MSG_RESULT(SDK include directory: ${SDK_INCLUDE_DIR})

JRE_BIN_DIR=${jvm_root_dir}/${jre_dir}/bin
AC_SUBST(JRE_BIN_DIR)
AC_MSG_RESULT(JRE tools directory: ${JRE_BIN_DIR})

JRE_LIB_DIR=${jvm_root_dir}/${jre_dir}/lib
AC_SUBST(JRE_LIB_DIR)
AC_MSG_RESULT(JRE lib directory: ${JRE_LIB_DIR})

# Find gcj prefix using gcj found in PATH.
gcj_prefix=`which gcj${gcc_suffix} | sed "s%/bin/gcj${gcc_suffix}%%"`

# Where do the gcj binaries live?
# For jhbuild based builds, they all live in a sibling of bin called
# gcj-bin.  Check for gcj-bin first, and use bin otherwise.
GCJ_BIN_DIR=`if test -d ${gcj_prefix}/gcj-bin; then echo ${gcj_prefix}/gcj-bin; else echo ${gcj_prefix}/bin; fi`
AC_SUBST(GCJ_BIN_DIR)
AC_MSG_RESULT(GCJ tools directory: ${GCJ_BIN_DIR})

echo host is ${host}
if test "x${host_cpu}" = "x"
then
  case ${host} in
    *-mingw* | *-cygwin*)
      host_cpu=x86;;
    i486-* | i586-* | i686-*)
      host_cpu=i386;;
    *)
      host_cpu=${host_cpu};;
  esac
fi
AC_MSG_RESULT(arch directory: ${host_cpu})
CPU=${host_cpu}
AC_SUBST(CPU)

if test "x${host_os}" = "x"
then
  case ${host} in
    *-mingw* | *-cygwin*)
      host_os=win32;;
    *-linux*)
      host_os=linux;;
    *)
      host_os=${host_os};;
  esac
fi
echo os directory: ${host_os}
OS=${host_os}
AC_SUBST(OS)

# make an expanded $libdir, for substituting into
# scripts (and other non-Makefile things).
LIBDIR=$libdir
if test "x${exec_prefix}" = "xNONE"
then
    lib_exec_prefix=$sdk_prefix
else
    lib_exec_prefix=$exec_prefix
fi
LIBDIR=`echo $libdir | sed "s:\\\${exec_prefix}:$lib_exec_prefix:g"`
AC_SUBST(LIBDIR)

# needed for aot-compile-rpm
MAKE=`which make`
AC_SUBST(MAKE)

AC_CONFIG_FILES(setup.py)
AC_CONFIG_FILES(aotcompile.py)
AC_CONFIG_FILES(rebuild-gcj-db)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT