summaryrefslogtreecommitdiff
path: root/configure.ac
blob: e293955ecacb7bbc85ef045b8de8d03d62bfc28e (plain) (blame)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
ppAC_PREREQ([2.69])
AC_INIT([emixer], [0.1], [flavio.ceolin@gmail.com])

AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

PKG_PROG_PKG_CONFIG

AC_LANG_C

AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_C___ATTRIBUTE__

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

EFL_COMPILER_FLAG
EFL_COMPILER_FLAG([-Wall])
EFL_COMPILER_FLAG([-Wextra])
EFL_COMPILER_FLAG([-Wshadow])
EFL_COMPILER_FLAG([-fvisibility=hidden])

# Checks for programs.
EFL_WITH_BIN([edje], [edje-cc], [edje_cc])

AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external], [need-ngettext])

# Checks for libraries.
PKG_CHECK_MODULES([EFL],
	[
		elementary
		eet
                ecore
                ecore-file
                enlightenment
	 ])

have_alsa_pkg="auto"
have_pulseaudio_pkg="auto"

if test "x${have_alsa_pkg}" = "xauto" -o "x${have_alsa_pkg}" = "xyes"; then
   PKG_CHECK_MODULES([ALSA], [alsa],
   [have_alsa_pkg="yes"],
   [have_alsa_pkg="no"])
fi

AC_ARG_ENABLE([alsa],
   [AC_HELP_STRING([--disable-alsa],
      [Disable alsa support. @<:@default=enabled@:>@])],
   [
    if test "x${enableval}" = "xyes" ; then
       have_alsa_pkg="yes"
    else
       have_alsa_pkg="no"
    fi
   ], [
    have_alsa_pkg="yes"
   ])
AM_CONDITIONAL([HAVE_ALSA_PKG], [test "x${have_alsa_pkg}" = "xyes"])

if test "x${have_pulseaudio_pkg}" = "xauto" -o "x${have_pulseaudio_pkg}" = "xyes"; then
   PKG_CHECK_MODULES([PULSE], [libpulse-simple libpulse],
   [have_pulseaudio_pkg="yes"],
   [have_pulseaudio_pkg="no"])
fi

AC_ARG_ENABLE([pulseaudio],
   [AC_HELP_STRING([--disable-pulseaudio],
      [Disable pulseaudio support. @<:@default=enabled@:>@])],
   [
    if test "x${enableval}" = "xyes" ; then
       have_pulseaudio_pkg="yes"
    else
       have_pulseaudio_pkg="no"
    fi
   ], [
    have_pulseaudio_pkg="yes"
   ])
AM_CONDITIONAL([HAVE_PULSEAUDIO_PKG], [test "x${have_pulseaudio_pkg}" = "xyes"])

release=$(pkg-config --variable=release enlightenment)
MODULE_ARCH="$host_os-$host_cpu-$release"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION", "Module version")

pkgdir=$(pkg-config --variable=modules enlightenment)/${PACKAGE}
AC_ARG_ENABLE(homedir-install,
  AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]),
  [ pkgdir="${HOME}/.e/e/modules/${PACKAGE}" ]
)

AC_SUBST(pkgdir)
backends_sub_dir="/emix/"
AC_DEFINE_UNQUOTED(BACKEND_DIR, "$backends_sub_dir", "Directory where to find the backends in located in prefix")

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([
po/Makefile.in \
emix.pc
Makefile
])
AC_OUTPUT([
data/xml/module.desktop
])


echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo
echo "  edje_cc..................: ${edje_cc}"
echo "  pulseaudio ..............: ${have_pulseaudio_pkg}"
echo "  alsa ....................: ${have_alsa_pkg}"
echo
echo "Compilation................: make (or gmake)"
echo "  CPPFLAGS.................: $CPPFLAGS"
echo "  CFLAGS...................: $CFLAGS"
echo "  LDFLAGS..................: $LDFLAGS"
echo
echo "Installation...............: make install (as root if needed, with 'su' or 'sudo')"
echo "  backends.................: $libdir$backends_sub_dir"
echo "  prefix...................: $prefix"
echo "  module...................: $pkgdir"
echo