[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure --disable-nls breaks build?
From: |
Andreas Dilger |
Subject: |
Re: configure --disable-nls breaks build? |
Date: |
Tue, 29 Jan 2002 14:02:45 -0700 |
User-agent: |
Mutt/1.2.5.1i |
On Jan 30, 2002 07:29 +1100, Andrew Clausen wrote:
> On Tue, Jan 29, 2002 at 01:17:39PM -0700, Andreas Dilger wrote:
> > I'm trying to build libparted without NLS and other options for a small
> > bootdisk environment, so I am running*:
>
> This is a LONG, SAD story :(
>
> You need newer automake/autoconf/gettext.
> (See README, and bug-parted archives)
Yes, I've also been trying to do that (just rebuilding autoconf RPM now).
> > (*) The --disable-{bsd,mac,mips,sun} options I added locally and I will
> > submit a patch when I can test it a bit, it is pretty straight forward.
>
> May as well add gpt and msdos for consistency?
Yes, I have those options also, but I obviously don't want to disable all
of the partition types in configure, or it wouldn't be much use in the end.
Patch is below (with only GPT, DOS, PC98, and loop partitions it saved
40kB on the stripped executable). I didn't include patches to configure
and such, since they will be re-built on your system anyways (maybe even
config.h.in is superfluous).
> (The pc98 thing is old, when we were worried about confusing
> RH's installer with pc98-look-alike partition tables.
> (Remember the 55aa magic braindamage?))
Yes, I figured as much. It might also be of use to disable some of the
filesystems on a per-fs basis, but for my usage I am disabling them all
(reiserfs and ext3 mkfs support is important and I don't need resizing,
so I'm just going with external mkfs.<fstype> programs).
Cheers, Andreas
=================== parted-1.6.0-pre2-config.diff =========================
diff -ru parted-1.6.0-pre2.orig/acconfig.h parted-1.6.0-pre2/acconfig.h
--- parted-1.6.0-pre2.orig/acconfig.h Mon Dec 31 05:39:38 2001
+++ parted-1.6.0-pre2/acconfig.h Tue Jan 29 10:36:04 2002
@@ -43,7 +43,21 @@
#undef ENABLE_MTRACE
+#undef ENABLE_BSD
+
+#undef ENABLE_DOS
+
+#undef ENABLE_GPT
+
+#undef ENABLE_LOOP
+
+#undef ENABLE_MAC
+
+#undef ENABLE_MIPS
+
#undef ENABLE_PC98
+
+#undef ENABLE_SUN
#undef HAVE_CATGETS
diff -ru parted-1.6.0-pre2.orig/config.h.in parted-1.6.0-pre2/config.h.in
--- parted-1.6.0-pre2.orig/config.h.in Mon Dec 31 05:43:46 2001
+++ parted-1.6.0-pre2/config.h.in Tue Jan 29 13:15:07 2002
@@ -44,8 +44,22 @@
#undef ENABLE_MTRACE
+#undef ENABLE_BSD
+
+#undef ENABLE_DOS
+
+#undef ENABLE_GPT
+
+#undef ENABLE_LOOP
+
+#undef ENABLE_MAC
+
+#undef ENABLE_MIPS
+
#undef ENABLE_PC98
+#undef ENABLE_SUN
+
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
diff -ru parted-1.6.0-pre2.orig/configure.in parted-1.6.0-pre2/configure.in
--- parted-1.6.0-pre2.orig/configure.in Sat Jan 26 10:37:44 2002
+++ parted-1.6.0-pre2/configure.in Tue Jan 29 13:14:11 2002
@@ -117,12 +117,68 @@
fi
AC_SUBST(PARTED_LDFLAGS)
+AC_ARG_ENABLE(bsd,
+ [ --enable-bsd build with bsd support [default=yes]], ,
+ enable_bsd=yes
+)
+if test x$enable_bsd = xyes; then
+ AC_DEFINE(ENABLE_BSD)
+fi
+
+AC_ARG_ENABLE(dos,
+ [ --enable-dos build with dos support [default=yes]], ,
+ enable_dos=yes
+)
+if test x$enable_dos = xyes; then
+ AC_DEFINE(ENABLE_DOS)
+fi
+
+AC_ARG_ENABLE(gpt,
+ [ --enable-gpt build with gpt support [default=yes]], ,
+ enable_gpt=yes
+)
+if test x$enable_gpt = xyes; then
+ AC_DEFINE(ENABLE_GPT)
+fi
+
+AC_ARG_ENABLE(loop,
+ [ --enable-loop build with loop support [default=yes]], ,
+ enable_loop=yes
+)
+if test x$enable_loop = xyes; then
+ AC_DEFINE(ENABLE_LOOP)
+fi
+
+AC_ARG_ENABLE(mac,
+ [ --enable-mac build with mac support [default=yes]], ,
+ enable_mac=yes
+)
+if test x$enable_mac = xyes; then
+ AC_DEFINE(ENABLE_MAC)
+fi
+
+AC_ARG_ENABLE(mips,
+ [ --enable-mips build with mips support [default=yes]], ,
+ enable_mips=yes
+)
+if test x$enable_mips = xyes; then
+ AC_DEFINE(ENABLE_MIPS)
+fi
+
AC_ARG_ENABLE(pc98,
[ --enable-pc98 build with pc98 support [default=yes]], ,
enable_pc98=yes
)
if test x$enable_pc98 = xyes; then
AC_DEFINE(ENABLE_PC98)
+fi
+
+AC_ARG_ENABLE(sun,
+ [ --enable-sun build with sun support [default=yes]], ,
+ enable_sun=yes
+)
+if test x$enable_sun = xyes; then
+ AC_DEFINE(ENABLE_SUN)
fi
AC_ARG_ENABLE(Werror,
diff -ru parted-1.6.0-pre2.orig/libparted/disk_dos.c
parted-1.6.0-pre2/libparted/disk_dos.c
--- parted-1.6.0-pre2.orig/libparted/disk_dos.c Thu Jan 24 05:53:06 2002
+++ parted-1.6.0-pre2/libparted/disk_dos.c Tue Jan 29 10:42:06 2002
@@ -164,16 +164,20 @@
{
PedDiskType* disk_type;
DosRawTable part_table;
+#ifdef ENABLE_PC98
char possible_pc98_table [PED_SECTOR_SIZE];
int pc98_is_zero;
+#endif
int i;
PED_ASSERT (dev != NULL, return 0);
if (!ped_device_read (dev, &part_table, 0, 1))
return 0;
+#ifdef ENABLE_PC98
if (!ped_device_read (dev, &possible_pc98_table, 1, 1))
return 0;
+#endif
/* check magic */
if (PED_LE16_TO_CPU (part_table.magic) != MSDOS_MAGIC)
@@ -187,8 +191,8 @@
/* If this is a GPT disk, fail here */
for (i = 0; i < 4; i++) {
if (part_table.partitions[i].type == 0xEE)
- return 0;
- }
+ return 0;
+ }
#ifdef ENABLE_PC98
pc98_is_zero = 1;
diff -ru parted-1.6.0-pre2.orig/libparted/libparted.c
parted-1.6.0-pre2/libparted/libparted.c
--- parted-1.6.0-pre2.orig/libparted/libparted.c Wed Jan 16 11:12:33 2002
+++ parted-1.6.0-pre2/libparted/libparted.c Tue Jan 29 10:40:38 2002
@@ -90,17 +90,30 @@
static void
init_disk_types ()
{
+#ifdef ENABLE_LOOP
ped_disk_loop_init (); /* must be last in the probe list */
-
+#endif
+#ifdef ENABLE_SUN
ped_disk_sun_init ();
+#endif
#ifdef ENABLE_PC98
ped_disk_pc98_init ();
#endif
+#ifdef ENABLE_DOS
ped_disk_msdos_init ();
+#endif
+#ifdef ENABLE_MIPS
ped_disk_mips_init ();
+#endif
+#ifdef ENABLE_MAC
ped_disk_mac_init ();
+#endif
+#ifdef ENABLE_GPT
ped_disk_gpt_init ();
+#endif
+#ifdef ENABLE_BSD
ped_disk_bsd_init ();
+#endif
}
#ifdef ENABLE_FS
@@ -141,16 +154,30 @@
static void
done_disk_types ()
{
+#ifdef ENABLE_SUN
ped_disk_sun_done ();
+#endif
#ifdef ENABLE_PC98
ped_disk_pc98_done ();
#endif
+#ifdef ENABLE_DOS
ped_disk_msdos_done ();
+#endif
+#ifdef ENABLE_MIPS
ped_disk_mips_done ();
+#endif
+#ifdef ENABLE_MAC
ped_disk_mac_done ();
+#endif
+#ifdef ENABLE_LOOP
ped_disk_loop_done ();
+#endif
+#ifdef ENABLE_GPT
ped_disk_gpt_done ();
+#endif
+#ifdef ENABLE_BSD
ped_disk_bsd_done ();
+#endif
}
static void _init() __attribute__ ((constructor));
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/