Subversion Repositories freemyipod

Rev

Rev 445 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 445 Rev 450
Line 1... Line 1...
1
dnl Process this file with autoconf to produce a configure script.
1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(elf2flt.c)
2
AC_INIT(elf2emcoreapp.c)
3
 
3
 
4
AC_ARG_WITH(zlib-prefix,
4
AC_ARG_WITH(zlib-prefix,
5
	AS_HELP_STRING([--with-zlib-prefix=<dir>], [path to installed zlib]),
5
	AS_HELP_STRING([--with-zlib-prefix=<dir>], [path to installed zlib]),
6
	[ ac_zlib_prefix=$withval ],
6
	[ ac_zlib_prefix=$withval ],
7
	[ ac_zlib_prefix=NONE ]
7
	[ ac_zlib_prefix=NONE ]
Line 29... Line 29...
29
	AS_HELP_STRING([--with-binutils-include-dir=<dir>], [include path for binutils headers]),
29
	AS_HELP_STRING([--with-binutils-include-dir=<dir>], [include path for binutils headers]),
30
	[ ac_binutils_include_dir=$withval ],
30
	[ ac_binutils_include_dir=$withval ],
31
	[ ac_binutils_include_dir=NONE ]
31
	[ ac_binutils_include_dir=NONE ]
32
)
32
)
33
 
33
 
34
AC_ARG_WITH(binutils-ldscript-dir,
-
 
35
	AS_HELP_STRING([--with-binutils-ldscript-dir=<dir>], [path to install elf2flt.ld]),
-
 
36
	[ ac_binutils_ldscript_dir=$withval ],
-
 
37
	[ ac_binutils_ldscript_dir=NONE ]
-
 
38
)
-
 
39
 
-
 
40
AC_ARG_WITH(binutils-build-dir,
34
AC_ARG_WITH(binutils-build-dir,
41
	AS_HELP_STRING([--with-binutils-build-dir=<dir>], [path to compiled binutils tree]),
35
	AS_HELP_STRING([--with-binutils-build-dir=<dir>], [path to compiled binutils tree]),
42
	[ ac_binutils_build_dir=$withval ],
36
	[ ac_binutils_build_dir=$withval ],
43
	[ ac_binutils_build_dir=NONE ]
37
	[ ac_binutils_build_dir=NONE ]
44
)
38
)
45
 
39
 
46
AC_ARG_ENABLE(ld-elf2flt-binary,
-
 
47
	AS_HELP_STRING([--disable-ld-elf2flt-binary], [use ld-elf2flt shell script]),
-
 
48
	[ use_ld_elf2flt_binary=$enableval ],
-
 
49
	[ use_ld_elf2flt_binary=yes ]
-
 
50
)
-
 
51
 
-
 
52
dnl convert a yes/no variable to 1/0 for C code
40
dnl convert a yes/no variable to 1/0 for C code
53
var_yn_to_10() {
41
var_yn_to_10() {
54
	if eval test \"\$$1\" = yes ; then
42
	if eval test \"\$$1\" = yes ; then
55
		eval $1=1
43
		eval $1=1
56
	else
44
	else
Line 133... Line 121...
133
binutils_include_dir=
121
binutils_include_dir=
134
if test "$ac_binutils_include_dir" != "NONE"; then
122
if test "$ac_binutils_include_dir" != "NONE"; then
135
  binutils_include_dir="-I$ac_binutils_include_dir"
123
  binutils_include_dir="-I$ac_binutils_include_dir"
136
fi
124
fi
137
 
125
 
138
zlib_include_dir=
-
 
139
if test "$ac_zlib_prefix" != "NONE"; then
-
 
140
  zlib_include_dir="-I$ac_zlib_prefix/include"
-
 
141
fi
-
 
142
 
-
 
143
binutils_ldscript_dir=
-
 
144
if test "$ac_binutils_ldscript_dir" = "NONE"; then
-
 
145
  ac_binutils_ldscript_dir="\${TOOLDIR}/../${target_alias}/lib"
-
 
146
fi
-
 
147
binutils_ldscript_dir="$ac_binutils_ldscript_dir"
-
 
148
 
-
 
149
if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then
126
if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then
150
	AC_MSG_ERROR([
127
	AC_MSG_ERROR([
151
 
128
 
152
You need to specify the location of the libfd.a and libiberty.a
129
You need to specify the location of the libfd.a and libiberty.a
153
host libraries from the binutils package.
130
host libraries from the binutils package.
Line 161... Line 138...
161
if test "$ac_bfd_include_dir" = "NONE" ; then
138
if test "$ac_bfd_include_dir" = "NONE" ; then
162
	AC_MSG_ERROR([
139
	AC_MSG_ERROR([
163
 
140
 
164
You need to specify the location of the bfd.h header from a
141
You need to specify the location of the bfd.h header from a
165
configured/compiled version of the binutils package for your target.
142
configured/compiled version of the binutils package for your target.
166
Without this your elf2flt may crash as it will try to use the
143
Without this your elf2emcoreapp may crash as it will try to use the
167
systems bfd.h which may be from a different binutils package.
144
systems bfd.h which may be from a different binutils package.
168
 
145
 
169
Run configure again specifying these options:
146
Run configure again specifying these options:
170
 
147
 
171
  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
148
  ./configure --target=<ARCH> --with-bfd-include-dir=<dir> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
Line 220... Line 197...
220
AC_SUBST(emit_relocs)
197
AC_SUBST(emit_relocs)
221
AC_SUBST(emit_ctor_dtor)
198
AC_SUBST(emit_ctor_dtor)
222
AC_SUBST(always_reloc_text)
199
AC_SUBST(always_reloc_text)
223
AC_SUBST(SYMBOL_PREFIX)
200
AC_SUBST(SYMBOL_PREFIX)
224
 
201
 
225
AC_OUTPUT(ld-elf2flt.sh:ld-elf2flt.in Makefile elf2flt.ld)
202
AC_OUTPUT(Makefile)
226
 
203