From 9edf861b03d45321b8e9bafbec9825df23d1b70f Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 12 Oct 2006 17:33:22 +0000 Subject: [PATCH] Initial preparations for multi-os support --- trunk/Makefile.am | 3 ++- trunk/acinclude.m4 | 25 +++++-------------------- trunk/configure.ac | 2 ++ 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/trunk/Makefile.am b/trunk/Makefile.am index 6d09840a..cce83569 100644 --- a/trunk/Makefile.am +++ b/trunk/Makefile.am @@ -8,6 +8,7 @@ lib_LTLIBRARIES = libburn/libburn.la libisofs/libisofs.la # Build libraries libburn_libburn_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +libburn_libburn_la_LIBADD = $(LIBBURN_ARCH_LIBS) $(THREAD_LIBS) libburn_libburn_la_SOURCES = \ libburn/async.c \ libburn/async.h \ @@ -42,7 +43,7 @@ libburn_libburn_la_SOURCES = \ libburn/sbc.h \ libburn/sector.c \ libburn/sector.h \ - libburn/sg.c \ + libburn/sg-@ARCH@.c \ libburn/sg.h \ libburn/source.h \ libburn/source.c \ diff --git a/trunk/acinclude.m4 b/trunk/acinclude.m4 index 985cf386..861847bb 100644 --- a/trunk/acinclude.m4 +++ b/trunk/acinclude.m4 @@ -1,18 +1,3 @@ -dnl Function to link an architecture specific file -dnl LINK_ARCH_SRC(source_dir, arch, source_file) -AC_DEFUN([COPY_ARCH_SRC], -[ - echo "copying $1/$2/$3 -> $1/$3" - old="$srcdir/$1/$2/$3" - new="$srcdir/$1/$3" - cat >$new <<__EOF__ -/* WARNING: This file was automatically generated! - * Original: $old - */ -__EOF__ - cat >>$new <$old -]) - AC_DEFUN([TARGET_SHIZZLE], [ ARCH="" @@ -22,6 +7,11 @@ AC_DEFUN([TARGET_SHIZZLE], case $target in *-*-linux*) ARCH=linux + LIBBURN_ARCH_LIBS= + ;; + *-*-freebsd*) + ARCH=freebsd + LIBBURN_ARCH_LIBS=-lcam ;; *) AC_ERROR([You are attempting to compile for an unsupported platform]) @@ -29,9 +19,4 @@ AC_DEFUN([TARGET_SHIZZLE], esac AC_MSG_RESULT([$ARCH]) - - # this doesn't actually do anything yet.. but it will someday when we port - # libburn - - #COPY_ARCH_SRC(libburn, $ARCH, transport.c) ]) diff --git a/trunk/configure.ac b/trunk/configure.ac index a164b9c3..d101994c 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -73,6 +73,8 @@ THREAD_LIBS=-lpthread AC_SUBST(THREAD_LIBS) TARGET_SHIZZLE +AC_SUBST(ARCH) +AC_SUBST(LIBBURN_ARCH_LIBS) dnl Add compiler-specific flags