libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd Makefile.in configure configure.in


From: Gerhard Reitmayr
Subject: [libcvd-members] libcvd Makefile.in configure configure.in
Date: Sat, 01 Mar 2008 13:37:40 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Gerhard Reitmayr <gerhard>      08/03/01 13:37:40

Modified files:
        .              : Makefile.in configure configure.in 

Log message:
        fixing some build issues on OSX, automatically create .deps 
dependencies file

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/Makefile.in?cvsroot=libcvd&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure?cvsroot=libcvd&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/libcvd/configure.in?cvsroot=libcvd&r1=1.105&r2=1.106

Patches:
Index: Makefile.in
===================================================================
RCS file: /cvsroot/libcvd/libcvd/Makefile.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- Makefile.in 28 Feb 2008 00:27:21 -0000      1.69
+++ Makefile.in 1 Mar 2008 13:37:39 -0000       1.70
@@ -163,14 +163,17 @@
        $(RANLIB) libcvd_debug.a
 
 debug:
-       mkdir -p debug/cvd_src debug/cvd_src/IRIX debug/cvd_src/Linux 
debug/cvd_src/OSX debug/cvd_src/fast debug/cvd_src/i686 debug/pnm_src
+       mkdir -p debug/cvd_src debug/cvd_src/IRIX debug/cvd_src/Linux 
debug/cvd_src/OSX debug/cvd_src/fast debug/cvd_src/i686 debug/cvd_src/noarch 
debug/pnm_src
 
 
 # Before we compile the test programs we need to augment the
 # search paths with the path to libcvd, and also add libcvd to the
 # libraries to use
 CPPFLAGS = -I. @CPPFLAGS@
-LDFLAGS = -L. -Wl,-R. @LDFLAGS@
+ifneq (@osx_hacks@,yes)
+    LDFLAGS = -Wl,-R. @LDFLAGS@
+endif
+LDFLAGS = -L. @LDFLAGS@
 LOADLIBES =  @LIBS@
 
 address@hidden@
@@ -234,12 +237,14 @@
 distclean: clean
        /bin/rm -f Makefile config.h config.status config.cache config.log 
cvd/config.h .deps config.dep_tmp
 
-depend:
+.deps:
        rm -f .sourcefiles
        find . -name "*.cxx" -o -name "*.cc" -o -name "*.cpp" -o -name "*.c" -o 
-name "*.C" > .sourcefiles
        rm -f .deps
        bash generate_dependencies.bash "-I. $(CPPFLAGS)" > .deps
 
+depend: .deps
+
 .PHONY: ChangeLog 
 
 ChangeLog:

Index: configure
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- configure   29 Feb 2008 18:44:57 -0000      1.104
+++ configure   1 Mar 2008 13:37:39 -0000       1.105
@@ -6768,12 +6768,53 @@
 
 if test "$host_vendor" == apple
 then
-       CPPFLAGS="$CPPFLAGS -I /sw/include -I/opt/local/include 
-I/usr/X11R6/include"
-       LIBS="$LIBS -L/sw/lib -L/opt/local/lib"
-       { echo "$as_me:$LINENO: Adding /sw to the build path." >&5
-echo "$as_me: Adding /sw to the build path." >&6;}
-       { echo "$as_me:$LINENO: Adding /opt/local to the build path." >&5
-echo "$as_me: Adding /opt/local to the build path." >&6;}
+       { echo "$as_me:$LINENO: checking for /opt/local" >&5
+echo $ECHO_N "checking for /opt/local... $ECHO_C" >&6; }
+if test "${ac_cv_file__opt_local+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross 
compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" 
>&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/opt/local"; then
+  ac_cv_file__opt_local=yes
+else
+  ac_cv_file__opt_local=no
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_file__opt_local" >&5
+echo "${ECHO_T}$ac_cv_file__opt_local" >&6; }
+if test $ac_cv_file__opt_local = yes; then
+
+               CPPFLAGS="$CPPFLAGS -I/opt/local/include"
+               LIBS="$LIBS -L/opt/local/lib"
+fi
+
+       { echo "$as_me:$LINENO: checking for /sw" >&5
+echo $ECHO_N "checking for /sw... $ECHO_C" >&6; }
+if test "${ac_cv_file__sw+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross 
compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" 
>&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/sw"; then
+  ac_cv_file__sw=yes
+else
+  ac_cv_file__sw=no
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_file__sw" >&5
+echo "${ECHO_T}$ac_cv_file__sw" >&6; }
+if test $ac_cv_file__sw = yes; then
+
+               CPPFLAGS="$CPPFLAGS -I/sw/include"
+               LIBS="$LIBS -L/sw/lib"
+fi
+
+       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
        { echo "$as_me:$LINENO: Adding /usr/X11R6/include to the build path." 
>&5
 echo "$as_me: Adding /usr/X11R6/include to the build path." >&6;}
        osx_hacks=yes
@@ -7938,6 +7979,133 @@
 
 
 
+       if test "$with_lapack" != no && test "$have_lapack" != yes
+       then
+               if test "$with_lapack" == ""
+               then
+                       with_lapack=yes
+               fi
+
+               save_LIBS="$LIBS"
+               save_CXXFLAGS="$CXXFLAGS"
+               a=
+
+       { echo "$as_me:$LINENO: checking if veclib is needed for LAPACK" >&5
+echo $ECHO_N "checking if veclib is needed for LAPACK... $ECHO_C" >&6; }
+       { echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6; }
+       LIBS="$LIBS -framework veclib"
+       { echo "$as_me:$LINENO: checking for dgesvd_" >&5
+echo $ECHO_N "checking for dgesvd_... $ECHO_C" >&6; }
+if test "${ac_cv_func_dgesvd_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dgesvd_ to an innocuous variant, in case <limits.h> declares dgesvd_.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dgesvd_ innocuous_dgesvd_
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dgesvd_ (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dgesvd_
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgesvd_ ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dgesvd_ || defined __stub___dgesvd_
+choke me
+#endif
+
+int
+main ()
+{
+return dgesvd_ ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_dgesvd_=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_dgesvd_=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dgesvd_" >&5
+echo "${ECHO_T}$ac_cv_func_dgesvd_" >&6; }
+if test $ac_cv_func_dgesvd_ = yes; then
+  :
+else
+  a=1
+fi
+
+
+
+               if test x$a == x
+               then
+                       cat >>confdefs.h <<\_ACEOF
+#define CVD_HAVE_LAPACK 1
+_ACEOF
+
+                       have_lapack=yes
+
+                       options="$options lapack"
+
+               else
+                       LIBS="$save_LIBS"
+                       CXXFLAGS="$save_CXXFLAGS"
+               fi
+       fi
+
+       if test "$have_lapack" != yes
+       then
+               :
+
+       fi
+
 
 
        if test "$with_pthread" != no && test "$have_pthread" != yes
@@ -10564,7 +10732,7 @@
 cvd_src/Linux/v4lbuffer                                                        
v4l1buffer END
 cvd_src/Linux/v4l2buffer                               v4l2buffer END
 cvd_src/IRIX/O2buffer,cvd_src/IRIX/sgi-video   o2buffer END
-cvd_src/OSX/qtbuffer                                                   qtbffer 
END
+cvd_src/OSX/qtbuffer                                                   
qtbuffer END
 
 #Libraries
 cvd_src/synchronized,cvd_src/eventobject,cvd_src/thread                pthread 
END
@@ -10579,7 +10747,7 @@
 
 #Split in to object files and defines
 #[ is a quadrigraph for [
-dep_objects="`awk -vORS=' ' '/[a-z]/{print $0".o"}' config.dep_tmp`"
+dep_objects="`awk -v ORS=' ' '{print $0".o"}' config.dep_tmp`"
 
 
 for i in `awk '!/[a-z]/{print "CVD_INTERNAL_HAVE_"$0}' config.dep_tmp`
@@ -10599,7 +10767,7 @@
 progs/se3_pre_mul          toon          lapack        END
 progs/se3_post_mul         toon          lapack     END
 progs/se3_inv              toon                         lapack         END
-progs/calibrate                   toon          videodisplay lapack v4l2buffer 
END
+progs/calibrate                   toon          videodisplay lapack END
 progs/img_play             videodisplay                END
 progs/cvd_display_image    videodisplay                END
 progs/img_play_bw          videodisplay                END

Index: configure.in
===================================================================
RCS file: /cvsroot/libcvd/libcvd/configure.in,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- configure.in        29 Feb 2008 18:44:57 -0000      1.105
+++ configure.in        1 Mar 2008 13:37:40 -0000       1.106
@@ -442,10 +442,15 @@
 
 if test "$host_vendor" == apple
 then
-       APPEND(CPPFLAGS, [-I /sw/include -I/opt/local/include 
-I/usr/X11R6/include])
-       APPEND(LIBS, [-L/sw/lib -L/opt/local/lib])
-       AC_MSG_NOTICE([Adding /sw to the build path.])
-       AC_MSG_NOTICE([Adding /opt/local to the build path.])
+       AC_CHECK_FILE(/opt/local, [
+               APPEND(CPPFLAGS, [-I/opt/local/include])
+               APPEND(LIBS, [-L/opt/local/lib])], 
+               [])
+       AC_CHECK_FILE(/sw, [
+               APPEND(CPPFLAGS, [-I/sw/include])
+               APPEND(LIBS, [-L/sw/lib])], 
+               [])
+       APPEND(CPPFLAGS, [-I/usr/X11R6/include])
        AC_MSG_NOTICE([Adding /usr/X11R6/include to the build path.])
        AC_SUBST(osx_hacks,yes)
        os_all_options="qtbuffer"
@@ -544,7 +549,12 @@
        AC_CHECK_LIB(lapack, dgesvd_, [], [a=1])
 ])
 
-
+CHECK_FOR_LIBRARY(lapack, [
+       AC_MSG_CHECKING(if veclib is needed for LAPACK)
+       AC_MSG_RESULT()
+       APPEND(LIBS, -framework veclib)
+       AC_CHECK_FUNC(dgesvd_, [], [a=1])
+])
 
 CHECK_FOR_LIBRARY(pthread, [
        APPEND(CXXFLAGS, -pthread)
@@ -822,7 +832,7 @@
 cvd_src/Linux/v4lbuffer                                                        
v4l1buffer END
 cvd_src/Linux/v4l2buffer                               v4l2buffer END
 cvd_src/IRIX/O2buffer,cvd_src/IRIX/sgi-video   o2buffer END
-cvd_src/OSX/qtbuffer                                                   qtbffer 
END
+cvd_src/OSX/qtbuffer                                                   
qtbuffer END
 
 #Libraries
 cvd_src/synchronized,cvd_src/eventobject,cvd_src/thread                pthread 
END
@@ -837,7 +847,7 @@
 
 #Split in to object files and defines
 #@<:@ is a quadrigraph for [
-AC_SUBST(dep_objects, ["`awk -vORS=' ' '/@<:@a-z@:>@/{print $0".o"}' 
config.dep_tmp`"])
+AC_SUBST(dep_objects, ["`awk -v ORS=' ' '{print $0".o"}' config.dep_tmp`"])
 
 for i in `awk '!/@<:@a-z@:>@/{print "CVD_INTERNAL_HAVE_"$0}' config.dep_tmp`
 do
@@ -853,7 +863,7 @@
 progs/se3_pre_mul          toon          lapack        END
 progs/se3_post_mul         toon          lapack     END
 progs/se3_inv              toon                         lapack         END
-progs/calibrate                   toon          videodisplay lapack v4l2buffer 
END
+progs/calibrate                   toon          videodisplay lapack END
 progs/img_play             videodisplay                END
 progs/cvd_display_image    videodisplay                END
 progs/img_play_bw          videodisplay                END




reply via email to

[Prev in Thread] Current Thread [Next in Thread]