[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] rapidsvn configure system

From: Scott Lamb <slamb_at_slamb.org>
Date: 2002-07-27 14:12:37 CEST

The attached patch adds the start of a configure system for RapidSVN.
It detects the C++ compiler and configuration of APR and wxWindows. It
doesn't detect configurations of neon and Subversion yet.

I've got some questions:

- any set rapidsvn coding standards/log msg standards? It doesn't seem
  to follow the main subversion stuff.

- what about Windows? I'm afraid I'm not knowledgable here.

- autoconf experts around? There seems to be a nice wxwin.m4 on my
  system, but I'm not using it because automake/aclocal/whatever confuse
  me.

- could there be a svn-config utility that has Subversion's flags to
  compile? It seems silly for rapidsvn to have to know anything about
  neon, since it doesn't use it directly.

Imagine the patch containing a "svn mv src/Makefile.in src/Makefile" at
the beginning.

-- 
Scott Lamb
Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in	Sat Jul 27 06:25:20 2002
@@ -0,0 +1,59 @@
+AC_INIT(src/rapidsvn.cpp)
+
+AC_PROG_CXX
+
+dnl
+dnl APR
+dnl
+
+APRCONFIG=apr-config
+AC_ARG_WITH(apr-config,
+[[  --with-apr-config=FILE    Use the given path to apr-config when determining
+                            APR configuration; defaults to "apr-config"]],
+[
+    if test "$withval" != "yes" -a "$withval" != ""; then
+        APRCONFIG=$withval
+    fi
+])
+AC_MSG_CHECKING([for APR])
+if $APRCONFIG --cflags > /dev/null; then
+    AC_MSG_RESULT([found])
+else
+    AC_MSG_RESULT([not found])
+    AC_MSG_ERROR([APR is required. Try --with-apr-config.])
+fi
+CXXFLAGS="$CXXFLAGS `$APRCONFIG --cflags` `$APRCONFIG --cppflags` \
+                    `$APRCONFIG --includes`"
+APR_LIBS="`$APRCONFIG --link-ld --libs`"
+
+dnl
+dnl wxWindows
+dnl
+
+WXCONFIG=wx-config
+AC_ARG_WITH(wx-config,
+[[  --with-wx-config=FILE     Use the given path to wx-config when determining
+                            wxWindows configuration; defaults to "wx-config"]],
+[
+    if test "$withval" != "yes" -a "$withval" != ""; then
+        WXCONFIG=$withval
+    fi
+])
+AC_MSG_CHECKING([wxWindows version])
+if wxversion=`$WXCONFIG --version`; then
+    AC_MSG_RESULT([$wxversion])
+else
+    AC_MSG_RESULT([none found])
+fi
+case $wxversion in
+    [2.3.[23]])
+        ;;
+    *)
+        AC_MSG_ERROR([wxWindows 2.3.2 required])
+        ;;
+esac
+CXXFLAGS="$CXXFLAGS `$WXCONFIG --cxxflags`"
+LDFLAGS="$LDFLAGS `$WXCONFIG --ldflags`"
+WX_LIBS="`$WXCONFIG --libs`"
+
+AC_OUTPUT(src/Makefile)
Index: ./src/Makefile.in
===================================================================
--- ./src/Makefile.in
+++ ./src/Makefile.in	Sat Jul 27 06:22:19 2002
@@ -0,0 +1,63 @@
+PROGRAM=rapidsvn
+
+CXX=@CXX@
+
+OBJECTS=action_thread.o \
+		add_action.o \
+		auth_baton.o \
+		checkout_action.o \
+		checkout_dlg.o \
+		commit_action.o \
+		commit_dlg.o \
+		copy_action.o \
+		copy_dlg.o \
+		delete_action.o \
+		delete_dlg.o \
+		exceptions.o \
+		filelist_ctrl.o \
+		folder_browser.o \
+		import_action.o \
+		import_dlg.o \
+		include.o \
+		merge_action.o \
+		merge_dlg.o \
+		mkdir_action.o \
+		mkdir_dlg.o \
+		notify.o \
+		report_dlg.o \
+		resolve_action.o \
+		revert_action.o \
+		svn_file_info.o \
+		svn_file_log.o \
+		svn_file_status.o \
+		trace_commit.o \
+		trace_update.o \
+		tracer.o \
+		update_action.o \
+		update_dlg.o \
+		utils.o \
+		rapidsvn.o \
+		rapidsvn_app.o
+
+APR_LIBS=@APR_LIBS@
+WX_LIBS=@WX_LIBS@
+LIBS=-lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_delta-1 -lsvn_subr-1 \
+		$(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS) $(APR_LIBS) \
+		$(WX_LIBS)
+SVN_INC=-I/usr/local/include/subversion-1
+CXXFLAGS=@CXXFLAGS@
+
+# implementation
+
+.SUFFIXES:	.o .cpp
+
+.cpp.o:
+	$(CXX) -c -g $(CXXFLAGS) $(SVN_INC) -o $@ $<
+
+all:    $(PROGRAM)
+
+$(PROGRAM):	$(OBJECTS)
+	$(CXX) -o $(PROGRAM)  $(LIBS) $(OBJECTS)
+
+clean: 
+	rm -f *.o $(PROGRAM)
Index: ./src/Makefile
===================================================================
--- ./src/Makefile
+++ ./src/.svn/empty-file	Fri Jul 26 08:52:08 2002
@@ -1,60 +0,0 @@
-PROGRAM=rapidsvn
-
-CXX=g++
-
-OBJECTS=action_thread.o \
-		add_action.o \
-		auth_baton.o \
-		checkout_action.o \
-		checkout_dlg.o \
-		commit_action.o \
-		commit_dlg.o \
-		copy_action.o \
-		copy_dlg.o \
-		delete_action.o \
-		delete_dlg.o \
-		exceptions.o \
-		filelist_ctrl.o \
-		folder_browser.o \
-		import_action.o \
-		import_dlg.o \
-		include.o \
-		merge_action.o \
-		merge_dlg.o \
-		mkdir_action.o \
-		mkdir_dlg.o \
-		notify.o \
-		report_dlg.o \
-		resolve_action.o \
-		revert_action.o \
-		svn_file_info.o \
-		svn_file_log.o \
-		svn_file_status.o \
-		trace_commit.o \
-		trace_update.o \
-		tracer.o \
-		update_action.o \
-		update_dlg.o \
-		utils.o \
-		rapidsvn.o \
-		rapidsvn_app.o
-
-APR_LIBS=-L/usr/share/apache2/lib
-LIBS=-lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_delta-1 -lsvn_subr-1 \
-		$(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS) $(APR_LIBS)
-SVN_INC=-I/usr/local/include/subversion-1
-
-# implementation
-
-.SUFFIXES:	.o .cpp
-
-.cpp.o:
-	$(CXX) -c -g `wx-config --cxxflags` $(SVN_INC) -o $@ $<
-
-all:    $(PROGRAM)
-
-$(PROGRAM):	$(OBJECTS)
-	$(CXX) -o $(PROGRAM)  $(LIBS) `wx-config --libs` $(OBJECTS)
-
-clean: 
-	rm -f *.o $(PROGRAM)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 27 14:12:35 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.