2010-03-08 10:21:13 -07:00
|
|
|
AC_INIT([gparted],[0.5.2-git],[https://bugzilla.gnome.org/enter_bug.cgi?product=gparted])
|
2008-04-07 14:10:28 -06:00
|
|
|
|
2004-10-21 09:32:57 -06:00
|
|
|
AC_CONFIG_SRCDIR(src/main.cc)
|
2008-04-07 14:10:28 -06:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2008-08-05 09:34:10 -06:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2004-10-21 09:32:57 -06:00
|
|
|
|
2008-04-07 14:10:28 -06:00
|
|
|
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
|
2004-09-19 16:32:22 -06:00
|
|
|
AM_MAINTAINER_MODE
|
2004-09-19 14:24:53 -06:00
|
|
|
|
2004-09-20 09:46:21 -06:00
|
|
|
|
2004-09-23 13:32:57 -06:00
|
|
|
dnl======================
|
|
|
|
dnl checks for programs
|
|
|
|
dnl======================
|
2004-09-19 14:24:53 -06:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
2008-08-05 09:34:10 -06:00
|
|
|
|
2008-07-23 11:56:57 -06:00
|
|
|
dnl======================
|
|
|
|
dnl checks for other programs
|
|
|
|
dnl======================
|
2008-07-26 10:50:16 -06:00
|
|
|
AC_CHECK_PROG(GKSUPROG, gksu, gksu)
|
2008-05-08 16:31:53 -06:00
|
|
|
|
2008-08-05 09:34:10 -06:00
|
|
|
|
2004-09-23 13:32:57 -06:00
|
|
|
dnl======================
|
|
|
|
dnl i18n stuff
|
|
|
|
dnl======================
|
2004-09-20 09:46:21 -06:00
|
|
|
GETTEXT_PACKAGE=gparted
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[description])
|
|
|
|
|
|
|
|
AM_GLIB_GNU_GETTEXT
|
2008-04-07 14:10:28 -06:00
|
|
|
IT_PROG_INTLTOOL([0.35.5])
|
2004-09-23 13:32:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
dnl======================
|
|
|
|
dnl checks for libs
|
|
|
|
dnl======================
|
2008-05-08 16:31:53 -06:00
|
|
|
AC_CHECK_LIB(uuid, uuid_generate, [], AC_MSG_ERROR([*** uuid library (libuuid) not found]))
|
|
|
|
AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found]))
|
|
|
|
|
2004-10-30 16:17:20 -06:00
|
|
|
|
2006-09-06 14:45:55 -06:00
|
|
|
dnl libparted
|
2006-09-14 14:34:49 -06:00
|
|
|
LIBPARTED_VERSION=1.7.1
|
|
|
|
AC_MSG_CHECKING(for libparted >= $LIBPARTED_VERSION)
|
2006-09-26 13:02:15 -06:00
|
|
|
LIBS_save="$LIBS"
|
2006-11-23 12:20:07 -07:00
|
|
|
LIBS="-lparted -luuid -ldl"
|
2006-09-06 14:45:55 -06:00
|
|
|
AC_TRY_RUN(
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <parted/parted.h>
|
2004-10-23 14:28:46 -06:00
|
|
|
|
2006-09-06 14:45:55 -06:00
|
|
|
int main ()
|
|
|
|
{
|
2010-02-27 16:28:34 -07:00
|
|
|
int min_major = 0;
|
|
|
|
int min_minor = 0;
|
|
|
|
int min_micro = 0;
|
|
|
|
int major = 0;
|
|
|
|
int minor = 0;
|
|
|
|
int micro = 0;
|
|
|
|
|
|
|
|
if ( ( sscanf( "$LIBPARTED_VERSION", "%d.%d.%d", &min_major, &min_minor, &min_micro ) == 3 ) ||
|
|
|
|
( sscanf( "$LIBPARTED_VERSION", "%d.%d", &min_major, &min_minor ) == 2 ) ||
|
|
|
|
( sscanf( "$LIBPARTED_VERSION", "%d", &min_major ) == 1 )
|
|
|
|
)
|
2006-09-14 14:34:49 -06:00
|
|
|
{
|
2010-02-27 16:28:34 -07:00
|
|
|
if ( ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, µ ) == 3 ) ||
|
|
|
|
( sscanf( ped_get_version(), "%d.%d", &major, &minor ) == 2 ) ||
|
|
|
|
( sscanf( ped_get_version(), "%d", &major ) == 1 )
|
|
|
|
)
|
2006-09-14 14:34:49 -06:00
|
|
|
{
|
|
|
|
printf( "Found libparted %s\t", ped_get_version() ) ;
|
2009-10-06 16:12:54 -06:00
|
|
|
return ! ( (major > min_major) ||
|
2010-02-27 16:28:34 -07:00
|
|
|
( (major == min_major) && (minor > min_minor) ) ||
|
|
|
|
( (major == min_major) && (minor == min_minor) && (micro >= min_micro) )
|
|
|
|
) ;
|
2006-09-14 14:34:49 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1 ;
|
2006-09-06 14:45:55 -06:00
|
|
|
}
|
2009-01-02 15:24:43 -07:00
|
|
|
,AC_MSG_RESULT(OK),AC_MSG_ERROR(*** Requires libparted >= $LIBPARTED_VERSION. Perhaps development header files missing?) )
|
2006-09-26 13:02:15 -06:00
|
|
|
LIBS="$LIBS_save"
|
2006-09-06 14:45:55 -06:00
|
|
|
|
|
|
|
|
2010-03-01 11:04:17 -07:00
|
|
|
dnl======================
|
|
|
|
dnl check whether libparted >= 2.2 (has improved partition table re-read code)
|
|
|
|
dnl======================
|
|
|
|
LIBPARTED_VERSION=2.2
|
|
|
|
AC_MSG_CHECKING(if libparted >= $LIBPARTED_VERSION (has improved pt re-read))
|
|
|
|
LIBS_save="$LIBS"
|
|
|
|
LIBS="-lparted -luuid -ldl"
|
|
|
|
need_work_around=yes
|
|
|
|
AC_TRY_RUN(
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <parted/parted.h>
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
int min_major = 0;
|
|
|
|
int min_minor = 0;
|
|
|
|
int min_micro = 0;
|
|
|
|
int major = 0;
|
|
|
|
int minor = 0;
|
|
|
|
int micro = 0;
|
|
|
|
|
|
|
|
if ( ( sscanf( "$LIBPARTED_VERSION", "%d.%d.%d", &min_major, &min_minor, &min_micro ) == 3 ) ||
|
|
|
|
( sscanf( "$LIBPARTED_VERSION", "%d.%d", &min_major, &min_minor ) == 2 ) ||
|
|
|
|
( sscanf( "$LIBPARTED_VERSION", "%d", &min_major ) == 1 )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
if ( ( sscanf( ped_get_version(), "%d.%d.%d", &major, &minor, µ ) == 3 ) ||
|
|
|
|
( sscanf( ped_get_version(), "%d.%d", &major, &minor ) == 2 ) ||
|
|
|
|
( sscanf( ped_get_version(), "%d", &major ) == 1 )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return ! ( (major > min_major) ||
|
|
|
|
( (major == min_major) && (minor > min_minor) ) ||
|
|
|
|
( (major == min_major) && (minor == min_minor) && (micro >= min_micro) )
|
|
|
|
) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1 ;
|
|
|
|
}
|
|
|
|
,[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE([HAVE_LIBPARTED_2_2_0_PLUS], [1], [Define to 1 if libparted contains improved partition table re-read code])
|
|
|
|
need_pt_reread_work_around=no]
|
|
|
|
,[AC_MSG_RESULT(no)
|
|
|
|
need_pt_reread_work_around=yes]
|
|
|
|
)
|
|
|
|
LIBS="$LIBS_save"
|
|
|
|
|
|
|
|
|
2006-09-06 14:45:55 -06:00
|
|
|
dnl GTKMM
|
2006-08-20 12:13:40 -06:00
|
|
|
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 > 2.8 )
|
2004-09-23 13:32:57 -06:00
|
|
|
AC_SUBST(GTKMM_LIBS)
|
|
|
|
AC_SUBST(GTKMM_CFLAGS)
|
|
|
|
|
2004-09-20 09:46:21 -06:00
|
|
|
|
2010-01-27 16:33:21 -07:00
|
|
|
dnl GTKMM 2.16 needed for gtk_show_uri()
|
|
|
|
PKG_CHECK_EXISTS(gtkmm-2.4 >= 2.16.0,
|
2009-11-03 10:27:35 -07:00
|
|
|
[AC_DEFINE(HAVE_GTK_SHOW_URI, 1, [Define to 1 if you have gtk_show_uri])],
|
|
|
|
[])
|
|
|
|
|
|
|
|
|
2008-09-15 11:23:11 -06:00
|
|
|
dnl======================
|
|
|
|
dnl check whether to build documentation - Gnome-Doc-Utils
|
|
|
|
dnl======================
|
|
|
|
AC_ARG_ENABLE(doc,
|
|
|
|
[ --disable-doc do not build documentation],,)
|
|
|
|
if test "x${enable_doc}" = "x" ; then
|
|
|
|
enable_doc=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether documentation should be built)
|
|
|
|
if test ${enable_doc} = no; then
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test ${enable_doc} = yes; then
|
|
|
|
GNOME_DOC_INIT
|
|
|
|
else
|
|
|
|
dnl Do not care if GDU is not found
|
|
|
|
GNOME_DOC_INIT(,,[:])
|
2009-11-03 10:57:15 -07:00
|
|
|
dnl Set #define HAVE_DISABLE_DOC 1 to indicate documentation not wanted
|
|
|
|
AC_DEFINE([HAVE_DISABLE_DOC], [1], [Define to 1 if --disable-doc specified])
|
2008-09-15 11:23:11 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(DISABLE_DOC, test ${enable_doc} = no)
|
|
|
|
|
|
|
|
|
2008-04-07 14:10:28 -06:00
|
|
|
AC_CONFIG_FILES([
|
2004-09-19 14:24:53 -06:00
|
|
|
Makefile
|
2005-10-05 16:37:17 -06:00
|
|
|
compose/Makefile
|
2008-09-22 16:41:49 -06:00
|
|
|
data/Makefile
|
|
|
|
data/icons/Makefile
|
2008-04-14 09:50:11 -06:00
|
|
|
doc/Makefile
|
2008-08-05 09:34:10 -06:00
|
|
|
help/Makefile
|
2004-09-19 14:24:53 -06:00
|
|
|
include/Makefile
|
|
|
|
src/Makefile
|
2004-09-20 09:46:21 -06:00
|
|
|
po/Makefile.in
|
2004-09-19 14:24:53 -06:00
|
|
|
])
|
2008-04-07 14:10:28 -06:00
|
|
|
|
2008-08-05 09:34:10 -06:00
|
|
|
AC_OUTPUT
|
2008-09-15 11:23:11 -06:00
|
|
|
|
|
|
|
|
|
|
|
dnl======================
|
|
|
|
dnl Summary
|
|
|
|
dnl======================
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "================ Final configuration ==================="
|
|
|
|
echo " Installing into prefix : $prefix"
|
|
|
|
echo ""
|
|
|
|
echo " Build documentation? : $enable_doc"
|
|
|
|
echo ""
|
2010-03-01 11:04:17 -07:00
|
|
|
echo " Need pt re-read work around? : $need_pt_reread_work_around"
|
|
|
|
echo ""
|
2008-09-15 11:23:11 -06:00
|
|
|
echo " If all settings are OK, type make and make install "
|
|
|
|
echo "========================================================"
|