Commit | Line | Data |
---|---|---|
ef016f83 MF |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.59)dnl | |
3 | AC_INIT(Makefile.in) | |
4 | AC_CONFIG_HEADER(config.h:config.in) | |
5 | ||
6 | sinclude(../common/aclocal.m4) | |
7 | ||
8 | # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around | |
9 | # it by inlining the macro's contents. | |
10 | sinclude(../common/common.m4) | |
11 | ||
12 | SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) | |
13 | SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) | |
14 | SIM_AC_OPTION_HOSTENDIAN | |
15 | SIM_AC_OPTION_DEFAULT_MODEL(bf537) | |
16 | SIM_AC_OPTION_ENVIRONMENT | |
17 | SIM_AC_OPTION_INLINE | |
18 | SIM_AC_OPTION_WARNINGS | |
19 | SIM_AC_OPTION_HARDWARE(yes,,\ | |
20 | bfin_cec \ | |
21 | bfin_ctimer \ | |
22 | bfin_dma \ | |
23 | bfin_dmac \ | |
24 | bfin_ebiu_amc \ | |
25 | bfin_ebiu_ddrc \ | |
26 | bfin_ebiu_sdc \ | |
27 | bfin_emac \ | |
28 | bfin_eppi \ | |
29 | bfin_evt \ | |
b5215db0 | 30 | bfin_gpio \ |
ef016f83 MF |
31 | bfin_gptimer \ |
32 | bfin_jtag \ | |
33 | bfin_mmu \ | |
34 | bfin_nfc \ | |
35 | bfin_otp \ | |
c43aadca | 36 | bfin_pfmon \ |
ef016f83 MF |
37 | bfin_pll \ |
38 | bfin_ppi \ | |
39 | bfin_rtc \ | |
40 | bfin_sic \ | |
41 | bfin_spi \ | |
42 | bfin_trace \ | |
43 | bfin_twi \ | |
44 | bfin_uart \ | |
45 | bfin_uart2 \ | |
46 | bfin_wdog \ | |
47 | bfin_wp \ | |
48 | eth_phy \ | |
49 | ) | |
50 | ||
9e6584c9 | 51 | AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap kill pread]) |
ef016f83 MF |
52 | AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h net/if.h linux/if_tun.h linux/mii.h]) |
53 | ||
54 | BFIN_SIM_EXTRA_OBJS= | |
55 | ||
56 | dnl make sure the dv-sockser code can be supported (i.e. windows) | |
57 | case ${host} in | |
58 | *mingw32*) ;; | |
59 | *) | |
60 | AC_DEFINE_UNQUOTED([HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.]) | |
61 | BFIN_SIM_EXTRA_OBJS="${BFIN_SIM_EXTRA_OBJS} dv-sockser.o" | |
62 | ;; | |
63 | esac | |
64 | ||
65 | AC_SUBST([BFIN_SIM_EXTRA_OBJS], ${BFIN_SIM_EXTRA_OBJS}) | |
66 | ||
67 | PKG_PROG_PKG_CONFIG | |
68 | PKG_CHECK_MODULES(SDL, sdl, [ | |
69 | AC_CHECK_LIB(dl, dlopen, [ | |
70 | SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL" | |
71 | SDL_LIBS="-ldl" | |
72 | ], [SDL_CFLAGS= SDL_LIBS=]) | |
73 | ], [:]) | |
74 | AC_SUBST(SDL_CFLAGS) | |
75 | AC_SUBST(SDL_LIBS) | |
76 | ||
77 | SIM_AC_OUTPUT |