-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
56 lines (44 loc) · 1.57 KB
/
configure.ac
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
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (C) 2023-2024 Collin Funk
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
AC_INIT([i8080-emulator], [1.00])
AC_CONFIG_SRCDIR([i8080-emulator.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects])
dnl Perfer silent builds.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
LT_INIT
dnl Check for SDL2.
SDL2_LIBRARY=
AC_CHECK_HEADER([SDL2/SDL.h], [
tmp_save_libs="$LIBS"
AC_SEARCH_LIBS([SDL_Init], [SDL2],
[SDL2_LIBRARY="$ac_cv_search_SDL_Init"])
LIBS="$tmp_save_libs"
])
AC_SUBST([SDL2_LIBRARY])
dnl Print a warning.
if test -z "$SDL2_LIBRARY"; then
AC_MSG_NOTICE([Missing libSDL2, space-invaders emulator will not be built])
fi
dnl Just build everything else.
AM_CONDITIONAL([BUILD_SPACE_INVADERS], [test "$SDL2_LIBRARY" != ""])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT