From: Stefan Monnier Date: Fri, 18 Apr 2008 15:48:06 +0000 (+0000) Subject: * configure.in: Define USE_LUCID/USE_MOTIF in config.h. X-Git-Tag: emacs-pretest-23.0.90~6196 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=73d798d5ae728a2cbc8eacf9cca8ddc618064f69;p=emacs.git * configure.in: Define USE_LUCID/USE_MOTIF in config.h. * lwlib/Makefile.in (TOOLKIT_DEFINES): Remove. * src/Makefile.in (TOOLKIT_DEFINES): Remove. (LIBW): Use a bit less #if, remove left over OPEN_LOOK stuff. --- diff --git a/ChangeLog b/ChangeLog index 72dda4f96be..b5f063caed2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-04-18 Stefan Monnier + + * configure.in: Define USE_LUCID/USE_MOTIF in config.h. + 2008-04-16 Stefan Monnier * configure.in (SYNC_INPUT): Use OPTION_DEFAULT_ON and AC_DEFINE diff --git a/configure b/configure index 745eb22ce7c..192c51b9c23 100755 --- a/configure +++ b/configure @@ -16734,7 +16734,6 @@ cat >>conftest.$ac_ext <<_ACEOF # endif #endif -#include #include #ifdef HAVE_UNISTD_H @@ -16883,15 +16882,12 @@ main () isn't worth using anyway. */ alarm (60); - for (;;) - { - t = (time_t_max << 1) + 1; - if (t <= time_t_max) - break; - time_t_max = t; - } - time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; - + for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) + continue; + time_t_max--; + if ((time_t) -1 < 0) + for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) + continue; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { @@ -16906,12 +16902,10 @@ main () && mktime_test ((time_t) (60 * 60 * 24)))) return 1; - for (j = 1; ; j <<= 1) + for (j = 1; 0 < j; j *= 2) if (! bigtime_test (j)) return 1; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) + if (! bigtime_test (j - 1)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); @@ -18820,13 +18814,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include /* for off_t */ - #include +#include int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); ; return 0; } @@ -18866,13 +18858,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include +#include int main () { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); +return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); ; return 0; } @@ -24062,6 +24052,19 @@ cat >>confdefs.h <<\_ACEOF #define USE_X_TOOLKIT 1 _ACEOF + if test "${USE_X_TOOLKIT}" == "LUCID"; then + +cat >>confdefs.h <<\_ACEOF +#define USE_LUCID 1 +_ACEOF + + elif test "${USE_X_TOOLKIT}" == "MOTIF"; then + +cat >>confdefs.h <<\_ACEOF +#define USE_MOTIF 1 +_ACEOF + + fi fi if test "${HAVE_X11}" = "yes" ; then diff --git a/configure.in b/configure.in index 31523db9d5c..dee41383f1e 100644 --- a/configure.in +++ b/configure.in @@ -2641,6 +2641,11 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then fi if test "${USE_X_TOOLKIT}" != "none" ; then AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) + if test "${USE_X_TOOLKIT}" == "LUCID"; then + AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.]) + elif test "${USE_X_TOOLKIT}" == "MOTIF"; then + AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.]) + fi fi if test "${HAVE_X11}" = "yes" ; then AC_DEFINE(HAVE_X11, 1, diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 75e6a4fdaeb..c6df2f5dd0f 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2008-04-18 Stefan Monnier + + * Makefile.in (TOOLKIT_DEFINES): Remove. + 2007-08-29 Károly Lőrentey * xlwmenu.c (XlwMenuRealize): Ignore X errors while setting up diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index a53308c6cf4..f0626bb4618 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -46,7 +46,7 @@ USE_X_TOOLKIT=@X_TOOLKIT_TYPE@ LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o MOTIF_OBJS = lwlib-Xm.o -TOOLKIT_DEFINES = -DUSE_$(USE_X_TOOLKIT) +TOOLKIT_DEFINES = TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS) OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o diff --git a/src/ChangeLog b/src/ChangeLog index a0583ac0ce2..a853b6fe917 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-18 Stefan Monnier + + * Makefile.in (TOOLKIT_DEFINES): Remove. + (LIBW): Use a bit less #if, remove left over OPEN_LOOK stuff. + 2008-04-06 YAMAMOTO Mitsuharu * Makefile.in (MAC_OBJ): Add mactoolbox.o. @@ -159,7 +164,8 @@ 2008-04-18 Stefan Monnier - * character.c (Fmultibyte_char_to_unibyte): Return latin1 chars unchanged. + * character.c (Fmultibyte_char_to_unibyte): + Return latin1 chars unchanged. * fileio.c (Fexpand_file_name): Refine last fix so `nm' is only relocated if it points to `name'. diff --git a/src/Makefile.in b/src/Makefile.in index 011a630f056..77e082d5f1f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -240,15 +240,6 @@ STARTFILES = START_FILES #endif /* not ORDINARY_LINK */ -#ifdef USE_X_TOOLKIT -#define USE_@X_TOOLKIT_TYPE@ -TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@ -#else -#ifndef USE_GTK -TOOLKIT_DEFINES = -#endif -#endif - #ifdef HAVE_DBUS DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ @@ -268,7 +259,7 @@ DBUS_OBJ = dbusbind.o /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM since it may have -I options that should override those two. */ -ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ +ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< @@ -317,29 +308,23 @@ LIBXMENU= #endif /* not HAVE_MENUS */ #ifdef USE_X_TOOLKIT -#define @X_TOOLKIT_TYPE@ -#if defined (LUCID) || defined (ATHENA) -#if HAVE_XAW3D -LIBW= -lXaw3d -#else -LIBW= -lXaw -#endif -#endif -#ifdef MOTIF -#if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP) -#define LIB_MOTIF_EXTRA -lXp -#else -#define LIB_MOTIF_EXTRA -#endif -#ifdef LIB_MOTIF -LIBW= LIB_MOTIF LIB_MOTIF_EXTRA -#else -LIBW= -lXm LIB_MOTIF_EXTRA -#endif -#endif -#ifdef OPEN_LOOK -LIBW= -lXol -#endif +# define @X_TOOLKIT_TYPE@ +# if HAVE_XAW3D +LUCID_LIBW= -lXaw3d +# else +LUCID_LIBW= -lXaw +# endif +# if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP) +# define LIB_MOTIF_EXTRA -lXp +# else +# define LIB_MOTIF_EXTRA +# endif +# ifdef LIB_MOTIF +MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA +# else +MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA +# endif +LIBW=$(@X_TOOLKIT_TYPE@_LIBW) #ifdef HAVE_X11XTR6 #ifdef NEED_LIBW