[Debburn-changes] r494 - in cdrkit/trunk: . doc/plattforms
genisoimage icedax include libunls libusal wodim
Eduard Bloch
blade at alioth.debian.org
Sun Nov 26 23:02:00 CET 2006
Author: blade
Date: 2006-11-26 23:01:59 +0100 (Sun, 26 Nov 2006)
New Revision: 494
Modified:
cdrkit/trunk/INSTALL
cdrkit/trunk/Makefile
cdrkit/trunk/doc/plattforms/README.aix5l
cdrkit/trunk/genisoimage/CMakeLists.txt
cdrkit/trunk/genisoimage/boot-mipsel.c
cdrkit/trunk/icedax/toc.c
cdrkit/trunk/include/AddSchilyBits.cmake
cdrkit/trunk/include/CMakeLists.txt
cdrkit/trunk/include/allocax.h
cdrkit/trunk/include/xconfig.h.in
cdrkit/trunk/libunls/CMakeLists.txt
cdrkit/trunk/libusal/scsi-aix.c
cdrkit/trunk/wodim/defaults.c
Log:
More reliable iconv.h and libiconv detection, improved Makefile wrapper, letting user pass LDFLAGS as needed, a bunch of xlc compliancy fixes, TROUBLESHOOTING section in the INSTALL instructions
Modified: cdrkit/trunk/INSTALL
===================================================================
--- cdrkit/trunk/INSTALL 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/INSTALL 2006-11-26 22:01:59 UTC (rev 494)
@@ -22,3 +22,21 @@
To force a custom target directory, use something like:
make install PREFIX=/opt/cdrkit
+
+TROUBLESHOOTING:
+
+Problem: Linking error.
+Solution: Look for missing dependencies. If you installed additional libraries
+in non-system paths, they may have a conflict with the system libraries which
+are already installed. Make sure that the linker gets the right ones, those
+that belong to the headers. For example, if you installed libmagic and libiconf
+into /usr/local/{include,lib} and your compiler or linker have different
+defaults (eg. they use /usr/lib, /usr/include or intermix them), then you can
+set CFLAGS and LDFLAGS vars to override the system defaults, assumed by cmake.
+Example:
+(AIX5l, /usr/lib is default lib dir but /usr/local/include is prefered by gcc
+for headers), command:
+ make CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
+
+Problem: "make install" uses the wrong target directory and appends /usr/local to it.
+Solution: override the complete target path with PREFIX=... (see above)
Modified: cdrkit/trunk/Makefile
===================================================================
--- cdrkit/trunk/Makefile 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/Makefile 2006-11-26 22:01:59 UTC (rev 494)
@@ -1,8 +1,27 @@
-all: build/Makefile
+CMAKETWEAKS:=@true
+
ifneq ($(CFLAGS),)
- cmake build -DCMAKE_C_FLAGS="$(CFLAGS)"
+CMAKETWEAKS.= && cmake build -DCMAKE_C_FLAGS="$(CFLAGS)"
endif
+
+
+ifneq ($(LDFLAGS),)
+CMAKETWEAKS.= && cmake build -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)"
+endif
+
+ifneq ($(LDLAGS),)
+CMAKETWEAKS.= && cmake build -DCMAKE_C_FLAGS="$(CFLAGS)"
+endif
+
+ifneq ($(PREFIX),)
+install: build/Makefile
+CMAKETWEAKS.= && cmake build -DCMAKE_INSTALL_PREFIX="$(PREFIX)"
+endif
+
+
+all: build/Makefile
+ $(CMAKETWEAKS)
$(MAKE) -C build $(MAKE_FLAGS) all
DISTNAME=cdrkit-$(shell cat VERSION)
@@ -41,7 +60,5 @@
%::
$(MAKE) build/Makefile
-ifneq ($(CFLAGS),)
- cmake build -DCMAKE_C_FLAGS="$(CFLAGS)"
-endif
+ $(CMAKETWEAKS)
$(MAKE) -C build $(MAKE_FLAGS) $@
Modified: cdrkit/trunk/doc/plattforms/README.aix5l
===================================================================
--- cdrkit/trunk/doc/plattforms/README.aix5l 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/doc/plattforms/README.aix5l 2006-11-26 22:01:59 UTC (rev 494)
@@ -2,9 +2,13 @@
SCSI transport has not been tested yet because of missing hardware.
- install cmake either from source or from binaries downloadable on cmake.org.
- Make sure the cmake is in your PATH.
+ Make sure the cmake is in your PATH and it can find its modules.
- GCC compiler (available on gcc.org) is recommended, however the native xlc
compiler should work as well.
+ - if you installed a local version of GNU libiconv and ld is confused and
+ spews linking errors related to .libiconv, you may force its linking with
+ cmake -DCMAKE_EXE_LINKER_FLAGS="-L/usr/X11R6/lib -L/usr/lib /usr/local/lib/libiconv.a" build
+ However, this is a dirty workaround.
Follow instructions from the INSTALL file.
Modified: cdrkit/trunk/genisoimage/CMakeLists.txt
===================================================================
--- cdrkit/trunk/genisoimage/CMakeLists.txt 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/genisoimage/CMakeLists.txt 2006-11-26 22:01:59 UTC (rev 494)
@@ -5,22 +5,23 @@
INCLUDE_DIRECTORIES(../include ../libhfs_iso ../wodim ${CMAKE_BINARY_DIR})
-FIND_FILE (USE_MAGIC magic.h)
+INCLUDE(CheckIncludeFiles)
+CHECK_INCLUDE_FILES("magic.h" USE_MAGIC)
IF(USE_MAGIC)
ADD_DEFINITIONS(-DUSE_MAGIC)
SET(MAGICLIBS magic)
ENDIF(USE_MAGIC)
-FIND_FILE (USE_ICONV iconv.h)
-IF(USE_ICONV)
- ADD_DEFINITIONS(-DUSE_ICONV)
-ENDIF(USE_ICONV)
-# iconv may be provided by the 3rd party library
-FIND_LIBRARY (USE_LIBICONV iconv)
+ IF(HAVE_ICONV_H)
+ ADD_DEFINITIONS(-DUSE_ICONV)
+INCLUDE(CheckLibraryExists)
+ CHECK_LIBRARY_EXISTS (iconv iconv_open "" USE_LIBICONV)
IF(USE_LIBICONV)
- SET(EXTRA_LIBICONV iconv)
-endif(USE_LIBICONV)
-
+ LIST(APPEND EXTRA_LIBS "iconv")
+ELSE(USE_LIBICONV)
+# MESSAGE("No additional libiconv found, maybe not required. If required, change linker flags, see TROUBLESHOOTING in the INSTALL file")
+ENDIF(USE_LIBICONV)
+ENDIF(HAVE_ICONV_H)
ADD_DEFINITIONS(-DUSE_LARGEFILES -DABORT_DEEP_ISO_ONLY -DAPPLE_HYB -DUDF -DDVD_VIDEO -DSORTING -DHAVE_CONFIG_H -DUSE_LIBSCHILY -DUSE_SCG -DJIGDO_TEMPLATE)
Modified: cdrkit/trunk/genisoimage/boot-mipsel.c
===================================================================
--- cdrkit/trunk/genisoimage/boot-mipsel.c 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/genisoimage/boot-mipsel.c 2006-11-26 22:01:59 UTC (rev 494)
@@ -82,7 +82,11 @@
struct extent {
uint32_t count;
uint32_t start;
-} __attribute__((packed));
+}
+#ifdef __GNUC__
+__attribute__((packed))
+#endif
+ ;
struct dec_bootblock {
int8_t pad[8];
@@ -91,7 +95,11 @@
int32_t loadAddr; /* Load below kernel */
int32_t execAddr; /* And exec there */
struct extent bootmap[MAX_MAPS];
-} __attribute__((packed));
+}
+#ifdef __GNUC__
+__attribute__((packed))
+#endif
+ ;
static void swap_in_elf32_ehdr(Elf32_Ehdr *ehdr)
{
Modified: cdrkit/trunk/icedax/toc.c
===================================================================
--- cdrkit/trunk/icedax/toc.c 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/icedax/toc.c 2006-11-26 22:01:59 UTC (rev 494)
@@ -1559,6 +1559,7 @@
static size_t buflen = 256;
static char *outline = 0;
size_t pos = 0;
+ size_t l=0;
/* init */
if(!outline) {
@@ -1595,7 +1596,7 @@
};
/* Resize buffer */
- const size_t l = strlen(insert);
+ l = strlen(insert);
while(pos + l + 1 >= buflen) {
outline = realloc(outline, buflen *= 2);
if(outline == 0) {
Modified: cdrkit/trunk/include/AddSchilyBits.cmake
===================================================================
--- cdrkit/trunk/include/AddSchilyBits.cmake 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/include/AddSchilyBits.cmake 2006-11-26 22:01:59 UTC (rev 494)
@@ -3,5 +3,7 @@
LIST(APPEND EXTRA_LIBS "rols")
+# not the proper place but ok, because it is linked from everywhere
+
ENDIF(NOT CHECKED_rols)
Modified: cdrkit/trunk/include/CMakeLists.txt
===================================================================
--- cdrkit/trunk/include/CMakeLists.txt 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/include/CMakeLists.txt 2006-11-26 22:01:59 UTC (rev 494)
@@ -89,10 +89,11 @@
CHECK_INCLUDE_FILES("sys/types.h;sys/mman.h" HAVE_SYS_MMAN_H)
CHECK_INCLUDE_FILES("sys/types.h;sys/dkio.h" HAVE_SYS_DKIO_H)
CHECK_INCLUDE_FILES("sys/types.h;sun/dkio.h" HAVE_SUN_DKIO_H)
+CHECK_INCLUDE_FILES("iconv.h" HAVE_ICONV_H)
+
INCLUDE(CheckCSourceCompiles)
-
SET(CMAKE_REQUIRED_LIBRARIES )
SET(TESTSRC "
#include <stdlib.h>
Modified: cdrkit/trunk/include/allocax.h
===================================================================
--- cdrkit/trunk/include/allocax.h 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/include/allocax.h 2006-11-26 22:01:59 UTC (rev 494)
@@ -48,7 +48,7 @@
# include <malloc.h>
# define alloca _alloca
# else
-# if HAVE_ALLOCA_H
+# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
Modified: cdrkit/trunk/include/xconfig.h.in
===================================================================
--- cdrkit/trunk/include/xconfig.h.in 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/include/xconfig.h.in 2006-11-26 22:01:59 UTC (rev 494)
@@ -110,6 +110,8 @@
/* if we have arpa/inet.h (missing on BeOS) */
/* BeOS has inet_ntoa() in <netdb.h> */
+#cmakedefine HAVE_ICONV_H
+
/*
* Convert to SCHILY name
*/
@@ -278,7 +280,8 @@
* Misc CC / LD related stuff
*/
-#define HAVE_DYN_ARRAYS 1 /* If the compiler allows dynamic sized arrays */
+// #warning FIXME, add a test
+#define HAVE_DYN_ARRAYS 1 */ /* If the compiler allows dynamic sized arrays */
#define HOST_SYSTEM "@CMAKE_SYSTEM_NAME@"
#cmakedefine CDRKIT_VERSION "@CDRKIT_VERSION@"
Modified: cdrkit/trunk/libunls/CMakeLists.txt
===================================================================
--- cdrkit/trunk/libunls/CMakeLists.txt 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/libunls/CMakeLists.txt 2006-11-26 22:01:59 UTC (rev 494)
@@ -2,11 +2,11 @@
INCLUDE_DIRECTORIES(../include ../libhfs_iso ../wodim ${CMAKE_BINARY_DIR})
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
-FIND_FILE (USE_ICONV iconv.h)
-IF(USE_ICONV)
- ADD_DEFINITIONS(-DUSE_ICONV)
-ENDIF(USE_ICONV)
+ IF(HAVE_ICONV_H)
+ADD_DEFINITIONS(-DUSE_ICONV)
+ ENDIF(HAVE_ICONV_H)
+
SET(LIBunls_SRCS nls_base.c nls_config.c nls_cp10000.c nls_cp10006.c nls_cp10007.c nls_cp10029.c nls_cp10079.c nls_cp10081.c nls_cp1250.c nls_cp1251.c nls_cp437.c nls_cp737.c nls_cp775.c nls_cp850.c nls_cp852.c nls_cp855.c nls_cp857.c nls_cp860.c nls_cp861.c nls_cp862.c nls_cp863.c nls_cp864.c nls_cp865.c nls_cp866.c nls_cp869.c nls_cp874.c nls_file.c nls_iso8859-1.c nls_iso8859-14.c nls_iso8859-15.c nls_iso8859-2.c nls_iso8859-3.c nls_iso8859-4.c nls_iso8859-5.c nls_iso8859-6.c nls_iso8859-7.c nls_iso8859-8.c nls_iso8859-9.c nls_koi8-r.c nls_koi8-u.c nls_iconv.c)
#SET_SOURCE_FILES_PROPERTIES(${LIBunls_SRCS} PROPERTIES )
ADD_LIBRARY (unls STATIC ${LIBunls_SRCS})
Modified: cdrkit/trunk/libusal/scsi-aix.c
===================================================================
--- cdrkit/trunk/libusal/scsi-aix.c 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/libusal/scsi-aix.c 2006-11-26 22:01:59 UTC (rev 494)
@@ -215,6 +215,11 @@
static void *
usalo_getbuf(SCSI *usalp, long amt)
{
+/* assume having a modern AIX here */
+#ifdef HAVE_ALLOCA_H
+ usalp->bufbase = (void *)valloc((size_t)amt);
+ return (usalp->bufbase);
+#else
void *ret;
int pagesize;
@@ -236,6 +241,7 @@
return (ret);
ret = palign(ret, pagesize);
return (ret);
+#endif
}
static void
Modified: cdrkit/trunk/wodim/defaults.c
===================================================================
--- cdrkit/trunk/wodim/defaults.c 2006-11-26 16:22:28 UTC (rev 493)
+++ cdrkit/trunk/wodim/defaults.c 2006-11-26 22:01:59 UTC (rev 494)
@@ -50,7 +50,7 @@
else if(NULL!=(t=getenv("CDR_DEVICE")))
devcand=t;
else if(NULL!=(t=cfg_get("CDR_DEVICE")))
- devcand=strdup(t); // needs to use it as a key later, same stat. memory
+ devcand=strdup(t); /* needs to use it as a key later, same stat. memory */
if(devcand && NULL != (t=cfg_get(devcand))) {
/* extract them now, may be used later */
@@ -60,7 +60,7 @@
if(p_dev_name) {
if(wc>0)
*p_dev_name = strdup(loc);
- else if(devcand) // small mem. leak possible, does not matter, checks for that would require more code size than we loose
+ else if(devcand) /* small mem. leak possible, does not matter, checks for that would require more code size than we loose */
*p_dev_name=strdup(devcand);
}
if(p_speed) { /* sth. to write back */
More information about the Debburn-changes
mailing list