-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathconfigure.ac
72 lines (60 loc) · 1.79 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([mednaffe],[0.9.3])
AC_CONFIG_SRCDIR([src/mednaffe.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects])
# Checks for programs.
AC_PROG_CC
AC_LANG([C])
# Check for host
AC_CANONICAL_HOST
case $host_os in
linux*)
AM_CONDITIONAL([LINUX], [true])
AM_CONDITIONAL([WINDOWS], [false])
AM_CONDITIONAL([MAC], [false])
;;
cygwin*|mingw*)
AM_CONDITIONAL([LINUX], [false])
AM_CONDITIONAL([WINDOWS], [true])
AM_CONDITIONAL([MAC], [false])
;;
darwin*)
AM_CONDITIONAL([MAC], [true])
AM_CONDITIONAL([LINUX], [false])
AM_CONDITIONAL([WINDOWS], [false])
;;
*)
AM_CONDITIONAL([LINUX], [false])
AM_CONDITIONAL([WINDOWS], [false])
AM_CONDITIONAL([MAC], [false])
;;
esac
case $host in
*-mingw32.static)
DEFINES="-DSTATIC_BUILD"
;;
*)
DEFINES=""
;;
esac
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([atexit memset mkdir realpath strrchr])
# Checks for libraries.
AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
if test "x$have_pkg_config" = xno; then
AC_MSG_ERROR('pkg-config' is required to compile Mednaffe)
else
PKG_PROG_PKG_CONFIG
fi
PKG_CHECK_MODULES([GTK],[gtk+-3.0 >= 3.22 glib-2.0 >= 2.48], AC_MSG_NOTICE([Checking for GTK+ 3 development libraries]), AC_MSG_ERROR(Mednaffe needs GTK+ >= 3.22 development libraries))
AC_SUBST(DEFINES)
AC_CONFIG_FILES([Makefile share/Makefile src/Makefile])
AC_OUTPUT