Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1576935
 поиск   регистрация   авторизация 
 
Группа :: Коммуникации
Пакет: SieFS

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: siefs-0.4-fix-configure.patch


diff -urNp siefs-0.4.orig/acconfig.h siefs-0.4/acconfig.h
--- siefs-0.4.orig/acconfig.h	2003-11-19 16:19:24 +0300
+++ siefs-0.4/acconfig.h	1970-01-01 03:00:00 +0300
@@ -1,3 +0,0 @@
-#undef PREFIX
-#undef FUSEINST
-
diff -urNp siefs-0.4.orig/configure.in siefs-0.4/configure.in
--- siefs-0.4.orig/configure.in	2004-08-13 10:39:07 +0400
+++ siefs-0.4/configure.in	2004-09-04 22:39:57 +0400
@@ -2,23 +2,15 @@ AC_INIT(siefs/siefs.c)
 AM_INIT_AUTOMAKE(siefs, 0.4)
 AM_CONFIG_HEADER(config.h)
 
+: ${CFLAGS="-Wall -W -g -O2"}
+
 AC_PROG_CC
 AC_PROG_RANLIB
 
-if test -z "$LD"; then
-	LD=ld
-fi
-AC_SUBST(LD)
-
-CFLAGS="-Wall -W -g -O2"
-
 AC_ARG_WITH(fuse,
 	[  --with-fuse=DIR	specify location of fuse],
 	[fuseinst="$withval"])
 
-CPPFLAGS="$CPPFLAGS -I${fuseinst}/include"
-LDFLAGS="$LDFLAGS -L${fuseinst}/lib"
-
 AC_MSG_CHECKING([fuse installation])
 if test -z "$fuseinst" ; then
 	for d in /usr /usr/local /opt ; do
@@ -48,17 +40,22 @@ if ! grep -q '\(\*release\)' $fuseinst/i
 ])
 fi
 AC_MSG_RESULT(${fuseinst})
-AC_SUBST(fuseinst)
+
+FUSE_CFLAGS=""
+FUSE_LIBS="-lfuse -lpthread"
+if test "$fuseinst" != "/usr"; then
+	FUSE_CFLAGS="-I$fuseinst/include $FUSE_CFLAGS"
+	FUSE_LIBS="-L$fuseinst/lib $FUSE_LIBS"
+fi
+AC_SUBST(FUSE_CFLAGS)
+AC_SUBST(FUSE_LIBS)
 
 subdirs="siefs converter"
 AC_SUBST(subdirs)
 
-AC_DEFINE_UNQUOTED(FUSEINST, "${fuseinst}")
-if test "x${prefix}" = "xNONE"; then
-	AC_DEFINE_UNQUOTED(PREFIX, "${ac_default_prefix}")
-else
-	AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
-fi
+AC_DEFINE_UNQUOTED(FUSEINST, "${fuseinst}", [Installation prefix for fuse])
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+AC_DEFINE_UNQUOTED(PREFIX, "${prefix}", [Installation prefix for siefs])
 
 AC_OUTPUT([Makefile siefs/Makefile converter/Makefile])
 
diff -urNp siefs-0.4.orig/siefs/Makefile.am siefs-0.4/siefs/Makefile.am
--- siefs-0.4.orig/siefs/Makefile.am	2004-08-13 10:45:30 +0400
+++ siefs-0.4/siefs/Makefile.am	2004-09-04 22:32:01 +0400
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-CFLAGS = -I$(fuseinst)/include
+AM_CFLAGS = @FUSE_CFLAGS@
 
 bin_PROGRAMS = siefs slink
 
@@ -9,7 +9,7 @@ siefs_SOURCES = siefs.c obex.c obex.h bf
 slink_SOURCES = slink.c obex.c obex.h bfb.c bfb.h comm.c comm.h \
 	crcmodel.c crcmodel.h
 
-LDADD = $(fuseinst)/lib/libfuse.a -lpthread
+siefs_LDADD = @FUSE_LIBS@
 
 install-exec-hook:
 	-rm -f /sbin/mount.siefs
 
design & coding: Vladimir Lettiev aka crux © 2004-2005