DtHelp: make it build
authorJon Trulson <jon@radscan.com>
Sat, 26 Oct 2019 22:05:48 +0000 (16:05 -0600)
committerJon Trulson <jon@radscan.com>
Sat, 26 Oct 2019 22:05:48 +0000 (16:05 -0600)
Use configure's endian checks to determine whether to set LSB in il/.

Add locale.h check, include to Helpos.c

Both via including autotools_config.h.

cde/lib/DtHelp/Helpos.c
cde/lib/DtHelp/Makefile.am
cde/lib/DtHelp/il/Makefile.am
cde/lib/DtHelp/il/ilint.h

index fd4285a24256c02a7f4199db599202518c8cdbc5..3787c33d41696d754c2145c949301a4013844316 100644 (file)
  ****************************************************************************
  ************************************<+>*************************************/
 
-
 #include <sys/param.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include <autotools_config.h>
+#if defined(HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
 #define X_INCLUDE_PWD_H
 #define XOS_USE_XT_LOCKING
 #include <X11/Xos_r.h>
index ebcc3263d0133ec27f295e7a129f6542f87375d7..bb36499a6f3512afed40e2a5fe26ea600f09ee50 100644 (file)
@@ -6,7 +6,8 @@ lib_LTLIBRARIES = libDtHelp.la
 
 libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \
                      -DCDE_INSTALLATION_TOP='"${prefix}"' \
-                     -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"'
+                     -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \
+                     @DT_INCDIR@ @DTI_INCDIR@
 
 libDtHelp_la_LIBADD = -ljpeg il/libil.la
 
index c3e2326d11bcdc2ce9e11187cad38168165029f3..d26e90f45967b0928985aa650292adf96b2417d1 100644 (file)
@@ -3,19 +3,8 @@ MAINTAINERCLEANFILES = Makefile.in
 noinst_LTLIBRARIES = libil.la
 
 libil_la_CFLAGS = -I.. -DDTLIB -DCDE_INSTALLATION_TOP='"${prefix}"' \
-                 -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"'
-
-if BSD
-libil_la_CFLAGS += -DLSB_BIT_ORDER
-else
- if LINUX
- libil_la_CFLAGS += -DLSB_BIT_ORDER
- else
-  if SUN
-  libil_la_CFLAGS += -DLSB_BIT_ORDER
-  endif
- endif
-endif
+                 -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \
+                 @DT_INCDIR@ @DTI_INCDIR@
 
 libil_la_SOURCES = ilX.c                ilbigray.c           ilcodec.c \
                   ilcontext.c          ilconvert.c          ilcrop.c \
index 68c8f39bfbb5f882afe2fae55adcff65b317529f..f7fdf1de0e5d854c190f906c730426e8f15bde4c 100644 (file)
         /*  General internal definitions for Image Library (IL).
         */
 
+/* use autotools detection to determine endianess */
+#include <autotools_config.h>
+#ifndef WORDS_BIGENDIAN
+# define LSB_BIT_ORDER
+#endif
+
 #include <stddef.h>        /* for size_t declaration */
 #ifndef IL_H
 #include "il.h"