Codebase list eiciel / debian/0.8.4-1 configure.ac
debian/0.8.4-1

Tree @debian/0.8.4-1 (Download .tar.gz)

configure.ac @debian/0.8.4-1raw · history · blame

dnl Establim el nom del paquet, la versiĆ³ i l'email de contacte
AC_INIT(eiciel, 0.8.4, rofi@ya.com)

dnl Establim com a prerequisit Autoconf 2.59
AC_PREREQ(2.57)

dnl Inicialitzem Automake
AM_INIT_AUTOMAKE([dist-bzip2])

dnl Volem suport de GETTEXT
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.11])

dnl Nomes serveix per veure si hi ha el codi
AC_CONFIG_SRCDIR(src/eiciel_standalone.cpp)

dnl Establim el config header
AC_CONFIG_HEADER(config.hpp)

dnl Volem que les proves es facin amb C++
AC_LANG(C++)

dnl Comprovem si hi ha el programa install
AC_PROG_INSTALL

dnl Comprovem si hi ha un preprocessador de C/C++
AC_PROG_CPP

dnl Comprovem si hi ha un compilador de C++
AC_PROG_CXX

dnl Hem de crear una llibreria dinamica
AC_PROG_LIBTOOL

dnl Comprovem si hi ha la llibreria gtkmm-2.0
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.0 libgnome-2.0 >= 2.10.0 gnome-vfs-2.0 >= 2.10.0 libnautilus-extension >= 2.10.0)

AC_MSG_CHECKING([for nautilus extensions directory])

AC_ARG_WITH(nautilus-extensions-dir, 
[  --with-nautilus-extensions-dir=DIR   Directory where nautilus extensions have to be
                          installed (usually /usr/lib/nautilus/extensions-1.0)]
, 
[
if test x$withval = xyes -o x$withval = xno;
then
   AC_MSG_ERROR([If you specify --with-nautilus-extensions-dir you must set the directory. E.g.: --with-nautilus-extensions-dir=/usr/lib/nautilus/extensions-1.0])
else 
 AC_SUBST(NAUTILUS_EXTENSIONS_DIR, [$withval])
 echo $withval
fi
]
,
[dnl La resta de distribucions de GNU/Linux
  if test -d `pkg-config --variable=prefix libnautilus-extension`/lib/nautilus/extensions-1.0 ;
  then
     AC_SUBST(NAUTILUS_EXTENSIONS_DIR, [`pkg-config --variable=prefix libnautilus-extension`/lib/nautilus/extensions-1.0])
	 AC_MSG_RESULT(${NAUTILUS_EXTENSIONS_DIR})
  else
   	AC_MSG_ERROR([I need pkg-config in order to determine where to install nautilus extensions. You may want to set --with-nautilus-extensions-dir=DIR])
  fi
]
)

dnl Comprovem els headers
AC_CHECK_HEADERS([sys/acl.h], [], [], [])

AC_CHECK_HEADERS([acl/libacl.h], [], [], [])

dnl Per a FreeBSD
AC_CHECK_FUNC([acl_get_perm_np], 
 [AC_DEFINE([HAVE_ACL_GET_PERM_NP], [], [Hi ha la funcio acl_get_perm_np])]
[])

AC_SUBST(llibreria_acl, [])
	
dnl Comprovem si hi ha la llibreria d'ACL
AC_CHECK_LIB(acl, acl_get_perm, 
 [
   AC_DEFINE([HAVE_ACL_GET_PERM], [], [Hi ha la funcio acl_get_perm])
   AC_SUBST(llibreria_acl, [-lacl])
 ],)

dnl Volem que ens generi el fitxers seguents
AC_OUTPUT([Makefile
		src/Makefile
		img/Makefile
		lib/Makefile
		po/Makefile.in
		man/Makefile
		doc/Makefile
		doc/C/Makefile
		doc/C/figures/Makefile
		])