File: configure.ac

package info (click to toggle)
mednaffe 0.8.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,764 kB
  • sloc: ansic: 19,891; sh: 4,174; makefile: 48
file content (48 lines) | stat: -rw-r--r-- 1,559 bytes parent folder | download
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_INIT([mednaffe], [0.8.8], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_SRCDIR([src/common.h])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST

# Checks for programs.
AC_PROG_CC
AC_LANG_C

# Check for host
case $host_os in
  linux*)
    AM_CONDITIONAL([LINUX], [true])
    ;;
    *)
    AM_CONDITIONAL([LINUX], [false])
    ;;
esac

# Checks for libraries.
AC_ARG_ENABLE(gtk3, [AC_HELP_STRING([--enable-gtk3], [Compile against GTK 3.x explicitly])], [enable_gtk3=$enableval], [enable_gtk3="no"])

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

if test "x$enable_gtk3" = xyes; then
  PKG_CHECK_MODULES([GTK],[gtk+-3.0 >= 3.4 glib-2.0 >= 2.32 gthread-2.0], AC_MSG_NOTICE([GTK 3.x selected explicitly]), AC_MSG_ERROR(Mednaffe needs GTK+ >= 3.4 development libraries))
  GTK_DEFINES="-DGTK3_ENABLED"
  AC_DEFINE([GTK3_ENABLED],[1],[Define to 1 if you have GTK 3])
else
  PKG_CHECK_MODULES([GTK],[gtk+-2.0 >= 2.24 glib-2.0 >= 2.32 gthread-2.0], AC_MSG_NOTICE([selecting GTK 2.x automatically]), AC_MSG_ERROR(Mednaffe needs GTK+ >= 2.24 development libraries))
  GTK_DEFINES="-DGTK2_ENABLED"
  AC_DEFINE([GTK2_ENABLED],[1],[Define to 1 if you have GTK 2])
fi

AC_SUBST(GTK_DEFINES)

AC_CONFIG_FILES([Makefile share/Makefile src/Makefile])
AC_OUTPUT