]> sourceware.org Git - dm.git/commitdiff
Build process fixes/tidy-ups.
authorAlasdair Kergon <agk@redhat.com>
Fri, 2 Apr 2004 15:18:36 +0000 (15:18 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 2 Apr 2004 15:18:36 +0000 (15:18 +0000)
Makefile.in
configure
configure.in
dmsetup/Makefile.in
include/Makefile.in
kernel/Makefile.in
lib/Makefile.in
lib/ioctl/libdm-iface.c [moved from lib/ioctl/libdevmapper.c with 100% similarity]
make.tmpl.in
man/Makefile.in

index 5a9d6d57a1cd9481cad52692d5cada908c8881a2..23ff48f4db8f1266e2029a21fb7b10a6158d2871 100644 (file)
@@ -20,16 +20,28 @@ kernelvsn = @kernelvsn@
 
 SUBDIRS = include man
 
+ifeq ("@INTL@", "yes")
+  SUBDIRS += po
+endif
+
 SUBDIRS += lib dmsetup
 
 ifeq ($(MAKECMDGOALS),distclean)
-  SUBDIRS += kernel
+  SUBDIRS += kernel po
 endif
 
 include make.tmpl
 
 lib: include
 dmsetup: lib
+po: dmsetup
+
+ifeq ("@INTL@", "yes")
+lib.pofile: include.pofile
+dmsetup.pofile: lib.pofile
+po.pofile: dmsetup.pofile
+pofile: po.pofile
+endif
 
 .PHONY: apply-patches install_static_lib
 
@@ -41,3 +53,4 @@ apply-patches:
 
 install_static_lib: all
        $(MAKE) -C lib install_static
+
index 995ad56a604831d6a613956a8673de7b2dfbc177..81ed77c95c3710b4789f8b7bd3d9e74bee5aa1d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -22,6 +22,13 @@ ac_help="$ac_help
   --enable-debug          Enable debugging"
 ac_help="$ac_help
   --enable-compat         Enable support for old device-mapper versions"
+ac_help="$ac_help
+  --enable-static_link    Use this to link the tools to their libraries
+                          statically.  Default is dynamic linking"
+ac_help="$ac_help
+  --enable-nls            Enable Native Language Support"
+ac_help="$ac_help
+  --with-localedir=DIR    Translation files in DIR [PREFIX/share/locale]"
 ac_help="$ac_help
   --with-kernel-dir=DIR   linux kernel source in DIR []"
 ac_help="$ac_help
@@ -561,12 +568,12 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  
 
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:570: checking for $ac_word" >&5
+echo "configure:577: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -598,7 +605,7 @@ done
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:602: checking for $ac_word" >&5
+echo "configure:609: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -628,7 +635,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:632: checking for $ac_word" >&5
+echo "configure:639: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -679,7 +686,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:683: checking for $ac_word" >&5
+echo "configure:690: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -711,7 +718,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -722,12 +729,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 726 "configure"
+#line 733 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -753,12 +760,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:762: checking whether we are using GNU C" >&5
+echo "configure:769: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -767,7 +774,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -786,7 +793,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:790: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:797: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -829,7 +836,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:833: checking for a BSD compatible install" >&5
+echo "configure:840: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -882,7 +889,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:886: checking whether ln -s works" >&5
+echo "configure:893: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -903,7 +910,7 @@ else
 fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:907: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:914: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -932,7 +939,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:936: checking for $ac_word" >&5
+echo "configure:943: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -965,12 +972,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:969: checking for $ac_hdr that defines DIR" >&5
+echo "configure:976: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 974 "configure"
+#line 981 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -978,7 +985,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1003,7 +1010,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1007: checking for opendir in -ldir" >&5
+echo "configure:1014: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1011,7 +1018,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1015 "configure"
+#line 1022 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1022,7 +1029,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1044,7 +1051,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1048: checking for opendir in -lx" >&5
+echo "configure:1055: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1052,7 +1059,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1056 "configure"
+#line 1063 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1063,7 +1070,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1086,7 +1093,7 @@ fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1090: checking how to run the C preprocessor" >&5
+echo "configure:1097: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1101,13 +1108,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1105 "configure"
+#line 1112 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1118,13 +1125,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1122 "configure"
+#line 1129 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1135,13 +1142,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1139 "configure"
+#line 1146 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1166,12 +1173,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1170: checking for ANSI C header files" >&5
+echo "configure:1177: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1175 "configure"
+#line 1182 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1179,7 +1186,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1196,7 +1203,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1207 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1214,7 +1221,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1218 "configure"
+#line 1225 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1235,7 +1242,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1239 "configure"
+#line 1246 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1246,7 +1253,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1273,17 +1280,17 @@ for ac_hdr in ctype.h errno.h fcntl.h stdio.h sys/ioctl.h sys/stat.h sys/types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1277: checking for $ac_hdr" >&5
+echo "configure:1284: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1282 "configure"
+#line 1289 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1311,18 +1318,18 @@ done
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1315: checking for working const" >&5
+echo "configure:1322: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1320 "configure"
+#line 1327 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
+typedef int charset[2]; const charset x = {0,0};
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -1365,7 +1372,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1386,21 +1393,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1390: checking for inline" >&5
+echo "configure:1397: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
+#line 1404 "configure"
 #include "confdefs.h"
 
 int main() {
-} $ac_kw foo() {
+} int $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1426,12 +1433,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1430: checking for off_t" >&5
+echo "configure:1437: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1435 "configure"
+#line 1442 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1459,12 +1466,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1463: checking for pid_t" >&5
+echo "configure:1470: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1468 "configure"
+#line 1475 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1492,12 +1499,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1496: checking for size_t" >&5
+echo "configure:1503: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1501 "configure"
+#line 1508 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1525,12 +1532,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1529: checking for st_rdev in struct stat" >&5
+echo "configure:1536: checking for st_rdev in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1534 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1538,7 +1545,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:1542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -1559,12 +1566,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1563: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1570: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1568 "configure"
+#line 1575 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1573,7 +1580,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1622,7 +1629,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1626: checking host system type" >&5
+echo "configure:1633: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1643,7 +1650,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1647: checking target system type" >&5
+echo "configure:1654: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1661,7 +1668,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1665: checking build system type" >&5
+echo "configure:1672: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1688,11 +1695,13 @@ case "$host_os" in
        linux*)
                CFLAGS=
                CLDFLAGS="-Wl,--version-script,.export.sym"
-               LD_DEPS=".export.sym" ;;
+               LD_DEPS=".export.sym"
+               SOFLAG="-shared" ;;
        darwin*)
                CFLAGS="-no-cpp-precomp"
                CLDFLAGS=
-               LD_DEPS= ;;
+               LD_DEPS=
+               SOFLAG="-dynamiclib" ;;
 esac
 
 
@@ -1744,19 +1753,28 @@ else
 fi
 
 
+# Check whether --enable-static_link or --disable-static_link was given.
+if test "${enable_static_link+set}" = set; then
+  enableval="$enable_static_link"
+  STATIC_LINK=$enableval
+else
+  STATIC_LINK=no
+fi
+
+
 if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ];
  then  exec_prefix="";
 fi;
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1754: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1772: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1778 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -1774,7 +1792,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 1778 "configure"
+#line 1796 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1796,12 +1814,12 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1800: checking return type of signal handlers" >&5
+echo "configure:1818: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1805 "configure"
+#line 1823 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1818,7 +1836,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1837,12 +1855,12 @@ EOF
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:1841: checking for vprintf" >&5
+echo "configure:1859: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1846 "configure"
+#line 1864 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -1865,7 +1883,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -1889,12 +1907,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:1893: checking for _doprnt" >&5
+echo "configure:1911: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1898 "configure"
+#line 1916 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -1917,7 +1935,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -1944,12 +1962,12 @@ fi
 for ac_func in mkdir rmdir uname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1948: checking for $ac_func" >&5
+echo "configure:1966: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
+#line 1971 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1972,7 +1990,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2001,17 +2019,17 @@ for ac_hdr in getopt.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2005: checking for $ac_hdr" >&5
+echo "configure:2023: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2028 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2038,6 +2056,72 @@ fi
 done
 
 
+echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
+# Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval="$enable_nls"
+  \
+               INTL=yes
+else
+  INTL=no
+fi
+
+echo "$ac_t""$INTL" 1>&6
+
+if test x$INTL = xyes; then
+       INTL_PACKAGE="device-mapper"
+       # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2077: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+  echo "$ac_t""$MSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+       if [ "x$MSGFMT" == x ];
+               then  { echo "configure: error: msgfmt not found in path $PATH
+               " 1>&2; exit 1; }
+               exit  
+       fi;
+
+       # Check whether --with-localedir or --without-localedir was given.
+if test "${with_localedir+set}" = set; then
+  withval="$with_localedir"
+   LOCALEDIR="$withval" 
+else
+   LOCALEDIR='${prefix}/share/locale' 
+fi
+
+fi
+
+
 echo $ac_n "checking for kernel directory""... $ac_c" 1>&6
 # Check whether --with-kerneldir or --without-kerneldir was given.
 if test "${with_kerneldir+set}" = set; then
@@ -2146,6 +2230,14 @@ fi
 
 
 
+
+
+
+
+
+
+
+
 
 
 
@@ -2273,6 +2365,7 @@ lib/Makefile                                                              \
 lib/libdm-common.h                                                     \
 kernel/Makefile                                                                \
 man/Makefile                                                           \
+po/Makefile                                                            \
 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
@@ -2329,7 +2422,9 @@ s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
+s%@MSGFMT@%$MSGFMT%g
 s%@JOBS@%$JOBS%g
+s%@STATIC_LINK@%$STATIC_LINK%g
 s%@OWNER@%$OWNER%g
 s%@GROUP@%$GROUP%g
 s%@interface@%$interface%g
@@ -2339,9 +2434,13 @@ s%@kernelvsn@%$kernelvsn%g
 s%@tmpdir@%$tmpdir%g
 s%@CLDFLAGS@%$CLDFLAGS%g
 s%@LD_DEPS@%$LD_DEPS%g
+s%@SOFLAG@%$SOFLAG%g
 s%@DEBUG@%$DEBUG%g
 s%@DM_LIB_VERSION@%$DM_LIB_VERSION%g
 s%@COMPAT@%$COMPAT%g
+s%@LOCALEDIR@%$LOCALEDIR%g
+s%@INTL_PACKAGE@%$INTL_PACKAGE%g
+s%@INTL@%$INTL%g
 
 CEOF
 EOF
@@ -2392,6 +2491,7 @@ lib/Makefile                                                              \
 lib/libdm-common.h                                                     \
 kernel/Makefile                                                                \
 man/Makefile                                                           \
+po/Makefile                                                            \
 "}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
index 5f893994aac9c231b13bde018d1be3c66e19304a..a546f4e43611270528298770340f0016dd288ab7 100644 (file)
@@ -50,11 +50,13 @@ case "$host_os" in
        linux*)
                CFLAGS=
                CLDFLAGS="-Wl,--version-script,.export.sym"
-               LD_DEPS=".export.sym" ;;
+               LD_DEPS=".export.sym"
+               SOFLAG="-shared" ;;
        darwin*)
                CFLAGS="-no-cpp-precomp"
                CLDFLAGS=
-               LD_DEPS= ;;
+               LD_DEPS=
+               SOFLAG="-dynamiclib" ;;
 esac
 
 dnl -- prefix is /usr by default, the exec_prefix default is setup later
@@ -82,6 +84,10 @@ dnl Disable Compatibility mode
 AC_ARG_ENABLE(compat,   [  --enable-compat         Enable support for old device-mapper versions],  \
 COMPAT=yes, COMPAT=no)
 
+dnl Enables staticly-linked tools
+AC_ARG_ENABLE(static_link, [  --enable-static_link    Use this to link the tools to their libraries
+                          statically.  Default is dynamic linking],  STATIC_LINK=$enableval, STATIC_LINK=no)
+
 dnl Clear default exec_prefix - install into /sbin rather than /usr/sbin
 if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
  then  exec_prefix="";
@@ -96,6 +102,29 @@ AC_CHECK_FUNCS(mkdir rmdir uname)
 dnl Check for getopt
 AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG")
 
+echo $ac_n "checking whether to enable internationalisation""... $ac_c" 1>&6
+dnl Internationalisation stuff
+AC_ARG_ENABLE(nls, [  --enable-nls            Enable Native Language Support],\
+               INTL=yes, INTL=no)
+echo "$ac_t""$INTL" 1>&6
+
+if test x$INTL = xyes; then
+       INTL_PACKAGE="device-mapper"
+       AC_PATH_PROG(MSGFMT, msgfmt)
+       if [[ "x$MSGFMT" == x ]];
+               then  AC_MSG_ERROR(
+               msgfmt not found in path $PATH
+               )
+               exit  
+       fi;
+
+       AC_ARG_WITH(localedir,
+                   [  --with-localedir=DIR    Translation files in DIR [PREFIX/share/locale]],
+                   [ LOCALEDIR="$withval" ],
+                   [ LOCALEDIR='${prefix}/share/locale' ])
+fi
+
+
 echo $ac_n "checking for kernel directory""... $ac_c" 1>&6
 dnl -- Where the linux src tree is
 AC_ARG_WITH(kerneldir,
@@ -184,6 +213,7 @@ fi
 
 
 AC_SUBST(JOBS)
+AC_SUBST(STATIC_LINK)
 AC_SUBST(OWNER)
 AC_SUBST(GROUP)
 AC_SUBST(LIBS)
@@ -195,9 +225,16 @@ AC_SUBST(tmpdir)
 AC_SUBST(CFLAGS)
 AC_SUBST(CLDFLAGS)
 AC_SUBST(LD_DEPS)
+AC_SUBST(SOFLAG)
 AC_SUBST(DEBUG)
 AC_SUBST(DM_LIB_VERSION)
 AC_SUBST(COMPAT)
+AC_SUBST(MSGFMT)
+AC_SUBST(LOCALEDIR)
+AC_SUBST(INTL_PACKAGE)
+AC_SUBST(INTL)
+
+
 dnl First and last lines should not contain files to generate in order to 
 dnl keep utility scripts running properly
 AC_OUTPUT(                                                             \
@@ -209,6 +246,7 @@ lib/Makefile                                                                \
 lib/libdm-common.h                                                     \
 kernel/Makefile                                                                \
 man/Makefile                                                           \
+po/Makefile                                                            \
 )
 
 echo
index de66ecf80a66a9554f639f036f3cf431227cc2dd..c1feeedc574bb6316818cb6f66e8863a9819f009 100644 (file)
@@ -16,20 +16,24 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 
-SOURCES=dmsetup.c
-TARGETS=dmsetup
+ifeq ("@STATIC_LINK@", "yes")
+  TARGET = dmsetup.static
+else
+  TARGET = dmsetup
+endif
+
+SOURCES = dmsetup.c
+TARGETS = $(TARGET)
+CLEAN_TARGETS = dmsetup dmsetup.static
 
 include ../make.tmpl
 
-dmsetup: $(OBJECTS) $(interfacedir)/libdevmapper.so \
+$(TARGET): $(OBJECTS) $(interfacedir)/libdevmapper.so \
         $(interfacedir)/libdevmapper.a
-       $(CC) -o dmsetup $(OBJECTS) $(LD_FLAGS) \
+       $(CC) -o $@ $(OBJECTS) $(LD_FLAGS) \
              -L$(interfacedir) -L$(DESTDIR)/lib $(LIBS) \
              -ldevmapper
 
-install: dmsetup
+install: $(TARGET)
        $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$<
 
-.PHONY: install 
-
-
index f5fcef35c75a8cc4923fd04275042420317cb7c1..c3327dea7e44016720374ae20836bae4c596d6df 100644 (file)
@@ -20,6 +20,8 @@ VPATH = @srcdir@
 
 LN_S = @LN_S@
 
+.PHONY: clean distclean all install pofile
+
 all: .symlinks_created
 
 .symlinks_created: .symlinks Makefile
@@ -34,9 +36,9 @@ distclean:
        find . -maxdepth 2 -type l -exec $(RM) \{\} \;
        $(RM) Makefile .include_symlinks .symlinks_created
 
+pofile: all
+
 clean:
 
 install:
 
-.PHONY: clean distclean all install
-
index b755f77c5e90825b8a342ded2e7c634490cd3a54..dba96772ae73a2dc84397767070abc0b9812326e 100644 (file)
@@ -44,6 +44,8 @@ fs=$(patsubst %,fs/%,$(FS))
 common=$(patsubst %,common/%,$(COMMON))
 ioctl=$(patsubst %,ioctl/%,$(IOCTL))
 
+.PHONY: install clean distclean all symlinks patches patches-clean
+
 all: symlinks
 
 symlinks:
@@ -122,5 +124,3 @@ clean:
 distclean:
        $(RM) Makefile
 
-.PHONY: install clean distclean all
-
index 5013c96d7d5872974e134ebd6cc9d7e2ec225fc9..1560969c6d963193411beb92f74debb8733b37bd 100644 (file)
@@ -17,9 +17,9 @@ top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 interface = @interface@
 
-SOURCES=libdm-common.c $(interface)/libdevmapper.c
+SOURCES = libdm-common.c $(interface)/libdm-iface.c
 
-INCLUDES=-I$(interface)
+INCLUDES = -I$(interface)
 
 LIB_STATIC = $(interface)/libdevmapper.a
 LIB_SHARED = $(interface)/libdevmapper.so
@@ -28,8 +28,18 @@ TARGETS = $(LIB_STATIC) $(LIB_SHARED)
 
 include ../make.tmpl
 
+.PHONY: install_dynamic install_static \
+       install_@interface@ install_@interface@_static
 
-install: install_@interface@
+ifeq ("@STATIC_LINK@", "yes")
+  INSTALL_TYPE = install_static
+else
+  INSTALL_TYPE = install_dynamic
+endif
+
+install: $(INSTALL_TYPE)
+
+install_dynamic: install_@interface@
        $(LN_S) -f libdevmapper.so.$(LIB_VERSION) $(libdir)/libdevmapper.so
        $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 libdevmapper.h \
                $(includedir)/libdevmapper.h
@@ -39,9 +49,6 @@ install_static: install_@interface@_static
        $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 libdevmapper.h \
                $(includedir)/libdevmapper.h
 
-
-.PHONY: install install_@interface@ install_static install_@interface@_static
-
 install_fs: fs/libdevmapper.so
        $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \
                $(libdir)/libdevmapper.so.$(LIB_VERSION)
@@ -54,10 +61,10 @@ install_ioctl_static: ioctl/libdevmapper.a
        $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \
                $(libdir)/libdevmapper.a.$(LIB_VERSION)
 
+.PHONY: distclean_lib distclean
+
 distclean_lib: 
        $(RM) libdm-common.h
 
 distclean: distclean_lib
 
-.PHONY: distclean_lib distclean
-
index 3410f2d7e609710a7228eb7ddae268f3841bb1ee..db619ca8087f0d13b3b9f7cbc1ae9a746de73966 100644 (file)
@@ -21,20 +21,24 @@ CC = @CC@
 RANLIB = @RANLIB@
 SHELL = /bin/sh
 INSTALL = @INSTALL@
+MSGFMT = @MSGFMT@
 LN_S = @LN_S@
 LIBS = @LIBS@
 CFLAGS += @CFLAGS@
+CLDFLAGS += @CLDFLAGS@
 LD_DEPS += @LD_DEPS@
+SOFLAG += @SOFLAG@
 
 # Setup directory variables
-prefix = $(DESTDIR)@prefix@
-exec_prefix = $(DESTDIR)@exec_prefix@
-bindir = @bindir@
-includedir = @includedir@
-libdir = @libdir@
-sbindir = @sbindir@
-infodir = @infodir@
-mandir = @mandir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = $(DESTDIR)@bindir@
+includedir = $(DESTDIR)@includedir@
+libdir = $(DESTDIR)@libdir@
+sbindir = $(DESTDIR)@sbindir@
+infodir = $(DESTDIR)@infodir@
+mandir = $(DESTDIR)@mandir@
+localedir = $(DESTDIR)@LOCALEDIR@
 kerneldir = @kerneldir@
 interface = @interface@
 interfacedir = $(top_srcdir)/lib/$(interface)
@@ -49,55 +53,66 @@ ifndef MAKEFLAGS
 MAKEFLAGS = @JOBS@
 endif
 
-SUFFIXES=.c .d .o .so .a
+SUFFIXES = .c .d .o .so .a .po .pot .mo
 
-CFLAGS+=-fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
+CFLAGS += -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
 
-#CFLAGS+=-W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wmissing-noreturn
+#CFLAGS += -W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wmissing-noreturn
 
 ifeq ("@DEBUG@", "yes")
-  CFLAGS+=-g -fno-omit-frame-pointer -DDEBUG
+  CFLAGS += -g -fno-omit-frame-pointer -DDEBUG
 else
-  CFLAGS+=-O2
+  CFLAGS += -O2
+endif
+
+ifeq ("@INTL@", "yes")
+  CFLAGS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
+endif
+
+LD_FLAGS += -L$(interfacedir)
+
+ifeq ("@STATIC_LINK@", "yes")
+  LD_FLAGS += -static
 endif
 
 ifeq ("@COMPAT@", "yes")
-  CFLAGS+=-DDM_COMPAT
+  CFLAGS += -DDM_COMPAT
 endif
 
-#CFLAGS+=-pg
-#LD_FLAGS+=-pg
+#CFLAGS += -pg
+#LD_FLAGS += -pg
 
 STRIP=
-#STRIP=-s
+#STRIP = -s
 
 LIB_VERSION := $(shell cat $(top_srcdir)/VERSION | \
                 awk -F '.' '{printf "%s.%s",$$1,$$2}')
 
-INCLUDES+=-I. -I$(top_srcdir)/include
+INCLUDES += -I. -I$(top_srcdir)/include
 
 ifdef DESTDIR
-  INCLUDES+=-I$(DESTDIR)/usr/include
+  INCLUDES += -I$(DESTDIR)/usr/include
 endif
 
 ifneq ("@missingkernel@", "yes")
-  INCLUDES+=-I$(kerneldir)/include
+  INCLUDES += -I$(kerneldir)/include
 endif
 
-INC_LNS=$(top_srcdir)/include/.symlinks_created
-
-LD_FLAGS+=-L$(interfacedir)
+INC_LNS = $(top_srcdir)/include/.symlinks_created
 
-DEPS=$(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS)
+DEPS = $(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS)
 
-OBJECTS=$(SOURCES:%.c=%.o)
+OBJECTS = $(SOURCES:%.c=%.o)
+POTFILES = $(SOURCES:%.c=%.pot)
 
 SUBDIRS.install := $(SUBDIRS:=.install)
+SUBDIRS.pofile := $(SUBDIRS:=.pofile)
 SUBDIRS.clean := $(SUBDIRS:=.clean)
 SUBDIRS.distclean := $(SUBDIRS:=.distclean)
 
-.PHONY: all install distclean clean
+.PHONY: all install pofile distclean clean
 .PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
+.PHONY: $(SUBDIRS.pofile)
 
 all: $(SUBDIRS) $(TARGETS)
 
@@ -115,35 +130,54 @@ $(SUBDIRS.clean):
 $(SUBDIRS.distclean):
        -$(MAKE) -C $(@:.distclean=) distclean
 
+ifeq ("@INTL@", "yes")
+pofile: $(SUBDIRS.pofile) $(POTFILES)
+
+$(SUBDIRS.pofile):
+       $(MAKE) -C $(@:.pofile=) pofile
+endif
+
 $(TARGETS): $(OBJECTS)
 
 %.o: %.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
 
+%.pot: %.c Makefile
+       $(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
+               $(CFLAGS) $< > $@
+
+%.so: %.o
+       $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
+
 $(LIB_SHARED): $(OBJECTS) $(LD_DEPS)
-       $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
-       -Wl,--version-script,.export.sym $(OBJECTS) -o $@
+       $(CC) $(SOFLAG) -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
+       $(CLDFLAGS) $(OBJECTS) -o $@
 
 $(LIB_STATIC): $(OBJECTS)
        $(RM) $@
-       $(AR) r $@ $(OBJECTS)
-       $(RANLIB) $@
+       $(AR) rs $@ $(OBJECTS)
 
 %.d: %.c
        set -e; \
        FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
        DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
        $(CC) -MM $(INCLUDES) $(CFLAGS) $< | \
-       sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d : $$DEPS /g" > $@; \
-               [ -s $@ ] || $(RM) $@
+       sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" > $@; \
+       [ -s $@ ] || $(RM) $@
+
+%.mo: %.po
+       $(MSGFMT) -o $@ $<
 
 clean: $(SUBDIRS.clean)
-       $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d)
+       $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
+             $(SOURCES:%.c=%.pot) $(LD_DEPS)
 
 distclean: $(SUBDIRS.distclean)
        $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
+             $(SOURCES:%.c=%.pot) $(LD_DEPS) \
              config.cache config.log config.status \
-             Makefile make.tmpl core
+             Makefile make.tmpl core \
+             device-mapper.po
 
 .export.sym: .exported_symbols
        set -e; (echo "Base {"; echo "  global:"; \
index f4c8fc25a6a64a899fbc50e32f9c65e4cc030fa0..b6d454f3021c7c5e257a5d6772e411eb873322ed 100644 (file)
@@ -16,8 +16,8 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 
-MANUALS=$(wildcard *.8)
-MAN8DIR=${mandir}/man8
+MANUALS = $(wildcard *.8)
+MAN8DIR = ${mandir}/man8
 
 include ../make.tmpl
 
This page took 0.079792 seconds and 5 git commands to generate.