]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - configure.ac
Support sdcc tool names as used on Fedora.
[sigrok-firmware-fx2lafw.git] / configure.ac
CommitLineData
36074319
UH
1##
2## This file is part of the fx2lafw project.
3##
4## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 2 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, write to the Free Software
18## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19##
20
21# We require at least autoconf 2.63 (AC_INIT format changed there).
22AC_PREREQ([2.63])
23
24AC_INIT([sigrok-firmware-fx2lafw], [0.1.0],
25 [sigrok-devel@lists.sourceforge.net],
26 [sigrok-firmware-fx2lafw], [http://www.sigrok.org])
27AC_CONFIG_HEADER([config.h])
28AC_CONFIG_MACRO_DIR([autostuff])
29AC_CONFIG_AUX_DIR([autostuff])
30
31# We require at least automake 1.11 (needed for 'silent rules').
32AM_INIT_AUTOMAKE([1.11 -Wall -Werror check-news])
33m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34
35AC_PROG_INSTALL
36AC_PROG_LN_S
37
3a7ae082
UH
38# On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename.
39AC_CHECK_PROGS([SDCC], [sdcc sdcc-sdcc])
40AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcc])
36074319 41AC_CHECK_PROGS([OBJCOPY], [objcopy])
3a7ae082 42AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin])
36074319
UH
43
44AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != "x"])
45AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != "x"])
46AM_COND_IF([FOUND_OBJCOPY], [AC_SUBST(FOUND_OBJCOPY, "yes")])
47AM_COND_IF([FOUND_MAKEBIN], [AC_SUBST(FOUND_MAKEBIN, "yes")])
48
49# The sdcc 8051 assembler binary has/had different names:
50# Newer sdcc, Debian / Ubuntu: sdas8051
51# Newer sdcc, Fedora: sdcc-sdas8051
52# Older sdcc: asx8051
53AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051])
54
9e7a268d 55AC_SUBST(SDCC_FLAGS, "--code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl\"-b DSCR_AREA=0x1e00\" -Wl\"-b INT2JT=0x1f00\"")
36074319
UH
56AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware")
57AC_SUBST(MAKEFLAGS, '--no-print-directory')
58
59AC_CONFIG_FILES([Makefile
60 include/Makefile
61 fx2lib/Makefile
62 fx2lib/include/Makefile
63 fx2lib/lib/Makefile
64 fx2lib/lib/interrupts/Makefile
65 hw/Makefile
66 hw/braintechnology-usb-lps/Makefile
67 hw/cwav-usbeeax/Makefile
68 hw/cwav-usbeedx/Makefile
69 hw/cwav-usbeesx/Makefile
70 hw/cypress-fx2/Makefile
71 hw/saleae-logic/Makefile
72 ])
73
74AC_OUTPUT
75