summaryrefslogblamecommitdiff
path: root/configure.ac
blob: e293955ecacb7bbc85ef045b8de8d03d62bfc28e (plain) (tree)
1
2
                   
                                                   



























                                                     


                                           






                          
                             

           









































                                                                                       
 












                                                                          

                                                                                                                 
 






                                                                
                
       

        


                       












                                                                               

                                                          






                                                                                         
                                                            
                                           
                                           
    
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