]> sourceware.org Git - dm.git/commitdiff
more syncing with lvm2 build process
authorAlasdair Kergon <agk@redhat.com>
Tue, 24 Feb 2004 19:23:27 +0000 (19:23 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 24 Feb 2004 19:23:27 +0000 (19:23 +0000)
configure
configure.in
lib/.export.sym [deleted file]
lib/.exported_symbols [new file with mode: 0644]
make.tmpl.in

index 78d1d2a36d8c839f3f788f3a6f1c4456c2612ebe..995ad56a604831d6a613956a8673de7b2dfbc177 100755 (executable)
--- a/configure
+++ b/configure
@@ -561,7 +561,7 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  
 
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk 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
@@ -1322,7 +1322,7 @@ else
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -1397,7 +1397,7 @@ for ac_kw in inline __inline__ __inline; do
 #include "confdefs.h"
 
 int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
 ; return 0; }
 EOF
 if { (eval echo configure:1404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -1686,9 +1686,13 @@ test "$host_alias" != "$target_alias" &&
 
 case "$host_os" in
        linux*)
-               CFLAGS= ;;
+               CFLAGS=
+               CLDFLAGS="-Wl,--version-script,.export.sym"
+               LD_DEPS=".export.sym" ;;
        darwin*)
-               CFLAGS="-no-cpp-precomp" ;;
+               CFLAGS="-no-cpp-precomp"
+               CLDFLAGS=
+               LD_DEPS= ;;
 esac
 
 
@@ -1746,13 +1750,13 @@ fi;
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1750: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1754: 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 1756 "configure"
+#line 1760 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -1770,7 +1774,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
+#line 1778 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1792,12 +1796,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:1796: checking return type of signal handlers" >&5
+echo "configure:1800: 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 1801 "configure"
+#line 1805 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1814,7 +1818,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1833,12 +1837,12 @@ EOF
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:1837: checking for vprintf" >&5
+echo "configure:1841: 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 1842 "configure"
+#line 1846 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -1861,7 +1865,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1869: \"$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
@@ -1885,12 +1889,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:1889: checking for _doprnt" >&5
+echo "configure:1893: 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 1894 "configure"
+#line 1898 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -1913,7 +1917,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1921: \"$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
@@ -1940,12 +1944,12 @@ fi
 for ac_func in mkdir rmdir uname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1944: checking for $ac_func" >&5
+echo "configure:1948: 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 1949 "configure"
+#line 1953 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1968,7 +1972,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1976: \"$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
@@ -1997,17 +2001,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:2001: checking for $ac_hdr" >&5
+echo "configure:2005: 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 2006 "configure"
+#line 2010 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2015: \"$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*
@@ -2144,6 +2148,9 @@ fi
 
 
 
+
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -2330,6 +2337,8 @@ s%@kerneldir@%$kerneldir%g
 s%@missingkernel@%$missingkernel%g
 s%@kernelvsn@%$kernelvsn%g
 s%@tmpdir@%$tmpdir%g
+s%@CLDFLAGS@%$CLDFLAGS%g
+s%@LD_DEPS@%$LD_DEPS%g
 s%@DEBUG@%$DEBUG%g
 s%@DM_LIB_VERSION@%$DM_LIB_VERSION%g
 s%@COMPAT@%$COMPAT%g
index 9123e2e5359952c69087e6404667577288680190..5f893994aac9c231b13bde018d1be3c66e19304a 100644 (file)
@@ -48,9 +48,13 @@ AC_CANONICAL_SYSTEM
 
 case "$host_os" in
        linux*)
-               CFLAGS= ;;
+               CFLAGS=
+               CLDFLAGS="-Wl,--version-script,.export.sym"
+               LD_DEPS=".export.sym" ;;
        darwin*)
-               CFLAGS="-no-cpp-precomp" ;;
+               CFLAGS="-no-cpp-precomp"
+               CLDFLAGS=
+               LD_DEPS= ;;
 esac
 
 dnl -- prefix is /usr by default, the exec_prefix default is setup later
@@ -188,6 +192,9 @@ AC_SUBST(kerneldir)
 AC_SUBST(missingkernel)
 AC_SUBST(kernelvsn)
 AC_SUBST(tmpdir)
+AC_SUBST(CFLAGS)
+AC_SUBST(CLDFLAGS)
+AC_SUBST(LD_DEPS)
 AC_SUBST(DEBUG)
 AC_SUBST(DM_LIB_VERSION)
 AC_SUBST(COMPAT)
diff --git a/lib/.export.sym b/lib/.export.sym
deleted file mode 100644 (file)
index 1c5b956..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Base {
-       global:
-               dm_log_init;
-               dm_log_init_verbose;
-               dm_task_create;
-               dm_task_destroy;
-               dm_task_set_name;
-               dm_task_set_uuid;
-               dm_get_library_version;
-               dm_task_get_driver_version;
-               dm_task_get_info;
-               dm_task_get_deps;
-               dm_task_get_name;
-               dm_task_get_names;
-               dm_task_get_versions;
-               dm_task_get_uuid;
-               dm_task_set_ro;
-               dm_task_set_newname;
-               dm_task_set_event_nr;
-               dm_task_set_major;
-               dm_task_set_minor;
-               dm_task_add_target;
-               dm_get_next_target;
-               dm_task_run;
-               dm_set_dev_dir;
-               dm_dir;
-               dm_format_dev;
-               dm_lib_release;
-               dm_lib_exit;
-       local:
-               *;
-};
diff --git a/lib/.exported_symbols b/lib/.exported_symbols
new file mode 100644 (file)
index 0000000..1b7ab16
--- /dev/null
@@ -0,0 +1,27 @@
+dm_log_init
+dm_log_init_verbose
+dm_task_create
+dm_task_destroy
+dm_task_set_name
+dm_task_set_uuid
+dm_get_library_version
+dm_task_get_driver_version
+dm_task_get_info
+dm_task_get_deps
+dm_task_get_name
+dm_task_get_names
+dm_task_get_versions
+dm_task_get_uuid
+dm_task_set_ro
+dm_task_set_newname
+dm_task_set_event_nr
+dm_task_set_major
+dm_task_set_minor
+dm_task_add_target
+dm_get_next_target
+dm_task_run
+dm_set_dev_dir
+dm_dir
+dm_format_dev
+dm_lib_release
+dm_lib_exit
index 0a948b009f6a2ecb17b010c12c568d079f7e9cc4..803d30506ee346ed6dfa96543e395a1a161c20f7 100644 (file)
@@ -28,6 +28,7 @@ INSTALL = @INSTALL@
 LN_S = @LN_S@
 LIBS = @LIBS@
 CFLAGS += @CFLAGS@
+LD_DEPS += @LD_DEPS@
 
 # Setup directory variables
 prefix = $(DESTDIR)@prefix@
@@ -109,7 +110,7 @@ install: all $(SUBDIRS.install)
 $(SUBDIRS):
        $(MAKE) -C $@
 
-$(SUBDIRS.install): 
+$(SUBDIRS.install): $(SUBDIRS)
        $(MAKE) -C $(@:.install=) install
 
 $(SUBDIRS.clean):
@@ -123,15 +124,11 @@ $(TARGETS): $(OBJECTS)
 %.o: %.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
 
-%.so: $(OBJECTS) .export.sym
-
-%.so: %.o
+$(LIB_SHARED): $(OBJECTS) $(LD_DEPS)
        $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
        -Wl,--version-script,.export.sym $(OBJECTS) -o $@
 
-%.a: $(OBJECTS)
-
-%.a: %.o
+$(LIB_STATIC): $(OBJECTS)
        $(RM) $@
        $(AR) r $@ $(OBJECTS)
        $(RANLIB) $@
@@ -152,6 +149,11 @@ distclean: $(SUBDIRS.distclean)
              config.cache config.log config.status \
              Makefile make.tmpl core
 
+.export.sym: .exported_symbols
+       set -e; (echo "Base {"; echo "  global:"; \
+                sed "s/^/              /;s/$$/;/" < $<; \
+                echo " local:"; echo "         *;"; echo "};") > $@
+
 ifneq ($(MAKECMDGOALS),clean)
   ifneq ($(MAKECMDGOALS),distclean)
     ifdef SOURCES
This page took 0.044187 seconds and 5 git commands to generate.