2044: Autoconfiscate trimesh2.

https://svn.lrde.epita.fr/svn/oln/trunk See also the contents of external/trimesh/ChangeLog below. Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Autoconfiscate trimesh2. * configure.ac: Require Autoconf 2.16 and Automake 1.10. Configure external/Makefile. Configure subdirectory external/trimesh/. Fix the definition of TESTS_CXXFLAGS_DEBUG. * Makefile.am (SUBDIR): Add external. * external/Makefile.am: New. * external/README: Update. * external/trimesh/ChangeLog: New. Makefile.am | 2 configure.ac | 18 ++--- external/Makefile.am | 3 external/README | 4 - external/trimesh/ChangeLog | 21 ++++++ external/trimesh/Makefile.am | 37 +++++----- external/trimesh/configure.ac | 62 ++++++++++++++++++ external/trimesh/gluit/Makefile.am | 118 ++++++++++++++++++++--------------- external/trimesh/include/Makefile.am | 23 ++++++ external/trimesh/libsrc/Makefile.am | 36 +++------- external/trimesh/utilsrc/Makefile.am | 71 ++++++++------------- 11 files changed, 250 insertions(+), 145 deletions(-) Index: configure.ac --- configure.ac (revision 2043) +++ configure.ac (working copy) @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.59]) +AC_PREREQ([2.61]) ## ---------------- ## @@ -15,8 +15,7 @@ AC_CONFIG_FILES([build-aux/Makefile]) # Automake. -# 1.9.4 because of changelog vs. ChangeLog on Darwin. -AM_INIT_AUTOMAKE([1.9.4 foreign check-news dist-bzip2 nostdinc -Wall]) +AM_INIT_AUTOMAKE([1.10 foreign check-news dist-bzip2 nostdinc -Wall]) ## --------------------- ## @@ -69,8 +68,7 @@ # * GNU C++ Library Compile Time Checks (a.k.a. concept checking): # http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch29.html if test "$GXX" = yes && test -z "$TESTS_CXXFLAGS_DEBUG"; then - TESTS_CXXFLAGS_DEBUG=\ - "-O0 -ggdb -Wall -W -D_GLIBCXX_DEBUG -D_GLIBCXX_CONCEPT_CHECKS" + TESTS_CXXFLAGS_DEBUG="-O0 -ggdb -Wall -W -D_GLIBCXX_DEBUG -D_GLIBCXX_CONCEPT_CHECKS" fi # ----------------- # @@ -84,9 +82,12 @@ fi -## -------------- ## -## Dependencies. ## -## -------------- ## +## ----------- ## +## Libraries. ## +## ----------- ## + +# (Bundled) trimesh2 library. +AC_CONFIG_SUBDIRS([external/trimesh]) # FreeImage library. OLN_WITH_FREEIMAGEPLUS @@ -107,6 +108,7 @@ # Ask for the Makefile creations. AC_CONFIG_FILES([ Makefile + external/Makefile milena/Makefile milena/doc/Makefile milena/tools/Makefile Index: Makefile.am --- Makefile.am (revision 2043) +++ Makefile.am (working copy) @@ -2,4 +2,4 @@ ACLOCAL_AMFLAGS = -I build-aux -SUBDIRS = build-aux milena +SUBDIRS = build-aux external milena Index: external/Makefile.am --- external/Makefile.am (revision 0) +++ external/Makefile.am (revision 0) @@ -0,0 +1,3 @@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- + +SUBDIRS = trimesh Index: external/trimesh/include/Makefile.am --- external/trimesh/include/Makefile.am (revision 0) +++ external/trimesh/include/Makefile.am (revision 0) @@ -0,0 +1,23 @@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- + +trimeshdir = $(includedir)/trimesh +nobase_trimesh_HEADERS = \ + GL/freeglut.h \ + GL/freeglut_ext.h \ + GL/freeglut_std.h \ + GL/glui.h \ + GL/glut.h \ + \ + bsphere.h \ + Color.h \ + GLCamera.h \ + ICP.h \ + KDtree.h \ + lineqn.h \ + mempool.h \ + noise3d.h \ + timestamp.h \ + TriMesh.h \ + TriMesh_algo.h \ + Vec.h \ + XForm.h Index: external/trimesh/gluit/Makefile.am --- external/trimesh/gluit/Makefile.am (revision 2041) +++ external/trimesh/gluit/Makefile.am (working copy) @@ -1,38 +1,19 @@ -#DEBUG = y -MAKERULESDIR = .. -DESTDIR = ../lib.$(UNAME) -INCLUDES = -I../include -I../include/GL +## Process this file through Automake to produce Makefile.in -*- Makefile -*- -include $(MAKERULESDIR)/Makerules - -ifeq ($(UNAME),Darwin) -CFILES = -else -CFILES = freeglut_callbacks.c \ - freeglut_cursor.c \ - freeglut_display.c \ - freeglut_ext.c \ - freeglut_font.c \ - freeglut_font_data.c \ - freeglut_gamemode.c \ - freeglut_geometry.c \ - freeglut_glutfont_definitions.c \ - freeglut_init.c \ - freeglut_joystick.c \ - freeglut_main.c \ - freeglut_menu.c \ - freeglut_misc.c \ - freeglut_overlay.c \ - freeglut_state.c \ - freeglut_stroke_mono_roman.c \ - freeglut_stroke_roman.c \ - freeglut_structure.c \ - freeglut_teapot.c \ - freeglut_videoresize.c \ - freeglut_window.c -endif - -CCFILES = glui.cc \ +# Find config.h. +AM_CPPFLAGS = -I$(top_builddir) +AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/include/GL + +# FIXME: We should use Libtool instead. +lib_LIBRARIES = libgluit.a + +libgluit_a_SOURCES = \ + glui_algebra3.h \ + glui_arcball.h \ + glui_quaternion.h \ + glui_stdinc.h \ + \ + glui.cc \ glui_add_controls.cc \ glui_algebra3.cc \ glui_arcball.cc \ @@ -57,19 +38,56 @@ glui_statictext.cc \ glui_translation.cc -OFILES = $(addprefix $(OBJDIR)/,$(CFILES:.c=.o) $(CCFILES:.cc=.o)) -LIB = $(DESTDIR)/libgluit.a -default: $(LIB) - -$(LIB): $(OFILES) - $(STATICLIB) - -clean: - -rm -f $(OFILES) $(OBJDIR)/Makedepend $(OBJDIR)/*.d - -rm -rf $(OBJDIR)/ii_files - -rmdir $(OBJDIR) - -spotless: clean - -rm -f $(LIB) - -rmdir $(DESTDIR) - +# These files are actually header, despite their `.c' extension! +noinst_HEADERS = \ + glui_img_checkbox_0.c \ + glui_img_checkbox_0_dis.c \ + glui_img_checkbox_1.c \ + glui_img_checkbox_1_dis.c \ + glui_img_downarrow.c \ + glui_img_leftarrow.c \ + glui_img_listbox_down.c \ + glui_img_listbox_up.c \ + glui_img_listbox_up_dis.c \ + glui_img_radiobutton_0.c \ + glui_img_radiobutton_0_dis.c \ + glui_img_radiobutton_1.c \ + glui_img_radiobutton_1_dis.c \ + glui_img_rightarrow.c \ + glui_img_spindown_0.c \ + glui_img_spindown_1.c \ + glui_img_spindown_dis.c \ + glui_img_spinup_0.c \ + glui_img_spinup_1.c \ + glui_img_spinup_dis.c \ + glui_img_uparrow.c + +# These files are not needed on Darwin (Mac OS X). +if ! DARWIN + libgluit_a_SOURCES += \ + freeglut_internal.h \ + freeglut_teapot_data.h \ + \ + freeglut_callbacks.c \ + freeglut_cursor.c \ + freeglut_display.c \ + freeglut_ext.c \ + freeglut_font.c \ + freeglut_font_data.c \ + freeglut_gamemode.c \ + freeglut_geometry.c \ + freeglut_glutfont_definitions.c \ + freeglut_init.c \ + freeglut_joystick.c \ + freeglut_main.c \ + freeglut_menu.c \ + freeglut_misc.c \ + freeglut_overlay.c \ + freeglut_state.c \ + freeglut_stroke_mono_roman.c \ + freeglut_stroke_roman.c \ + freeglut_structure.c \ + freeglut_teapot.c \ + freeglut_videoresize.c \ + freeglut_window.c +endif ! DARWIN Index: external/trimesh/utilsrc/Makefile.am --- external/trimesh/utilsrc/Makefile.am (revision 2041) +++ external/trimesh/utilsrc/Makefile.am (working copy) @@ -1,46 +1,31 @@ -# DEBUG = y -MAKERULESDIR = .. -DESTDIR = ../bin.$(UNAME) -INCLUDES = -I../include -LIBDIR = -L../lib.$(UNAME) +## Process this file through Automake to produce Makefile.in -*- Makefile -*- -include $(MAKERULESDIR)/Makerules +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_LDFLAGS = -L$(top_builddir)/libsrc -L$(top_builddir)/gluit -lm -ltrimesh -VIEWSOURCES = mesh_view.cc - -OTHERSOURCES = mesh_align.cc \ - mesh_cat.cc \ - mesh_cc.cc \ - mesh_filter.cc \ - mesh_make.cc \ - mesh_shade.cc - -VIEWOFILES = $(addprefix $(OBJDIR)/,$(VIEWSOURCES:.cc=.o)) -OTHEROFILES = $(addprefix $(OBJDIR)/,$(OTHERSOURCES:.cc=.o)) -OFILES = $(VIEWOFILES) $(OTHEROFILES) - -VIEWPROG = $(DESTDIR)/mesh_view$(EXE) -OTHERPROGS = $(addsuffix $(EXE), $(addprefix $(DESTDIR)/, $(OTHERSOURCES:.cc=))) -PROGS = $(OTHERPROGS) $(VIEWPROG) - -default: $(PROGS) - - -LIBS += -ltrimesh -$(VIEWPROG) : $(VIEWOFILES) - $(LINK) $(GLLIBS) - -$(OTHERPROGS) : $(DESTDIR)/%$(EXE) : $(OBJDIR)/%.o - $(LINK) - -$(PROGS) : ../lib.$(UNAME)/libtrimesh.a - -clean : - -rm -f $(OFILES) $(OBJDIR)/Makedepend $(OBJDIR)/*.d - -rm -rf $(OBJDIR)/ii_files - -rmdir $(OBJDIR) - -spotless : clean - -rm -f $(PROGS) - -rmdir $(DESTDIR) +# FIXME: Handle other OSes as well (Win32, SunOS, etc.) +if DARWIN +# LIBS += -lobjc + GLLIBS = -framework GLUT -framework OpenGL -lgluit +else !DARWIN + GLLIBS = -lgluit -lGL -lGLU -lX11 -lXmu -lXi +endif !DARWIN + +bin_PROGRAMS = \ + mesh_align \ + mesh_cat \ + mesh_cc \ + mesh_filter \ + mesh_make \ + mesh_shade \ + mesh_view + +mesh_align_SOURCES = mesh_align.cc +mesh_cat_SOURCES = mesh_cat.cc +mesh_cc_SOURCES = mesh_cc.cc +mesh_filter_SOURCES = mesh_filter.cc +mesh_make_SOURCES = mesh_make.cc +mesh_shade_SOURCES = mesh_shade.cc +mesh_view_SOURCES = mesh_view.cc +mesh_view_LDFLAGS = $(AM_LDFLAGS) $(GLLIBS) Index: external/trimesh/ChangeLog --- external/trimesh/ChangeLog (revision 0) +++ external/trimesh/ChangeLog (revision 0) @@ -0,0 +1,21 @@ +2008-06-19 Roland Levillain <roland@lrde.epita.fr> + + Autoconfiscate the package. + + * configure.ac: New. + * Makefile, gluit/Makefile, include/Makefile, + * libsrc/Makefile, utilsrc/Makefile: + Rename as... + * Makefile.am, gluit/Makefile.am, libsrc/Makefile.am, + * include/Makefile.am, utilsrc/Makefile.am: + ...these. + Convert these Makefiles to Automake. + + +Local Variables: +ispell-local-dictionary: "american" +End: + +$Rev$ +$Id$ +$Date$ Property changes on: external/trimesh/ChangeLog ___________________________________________________________________ Name: svn:keywords + Rev Id Date Index: external/trimesh/configure.ac --- external/trimesh/configure.ac (revision 0) +++ external/trimesh/configure.ac (revision 0) @@ -0,0 +1,62 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.61]) + +AC_INIT([trimesh2], [2.8], [smr at princeton edu]) + +# Auxiliary files. +AC_CONFIG_AUX_DIR([build-aux]) + +# Automake. +AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2 nostdinc -Wall]) + +## --------------------- ## +## C++ compiler set up. ## +## --------------------- ## + +# If the user doesn't provide any CXXFLAGS, prevent Autoconf from +# settings its own default ones (e.g., `-g -O2' for g++). +if test ! ${CXXFLAGS+set}; then + CXXFLAGS="" +fi + +# Look for a C compiler (used by freeglut). +AC_LANG([C]) +AC_PROG_CC + +# Look for a C++ compiler. +AC_LANG([C++]) +AC_PROG_CXX + +# Look for ranlib. +AC_PROG_RANLIB + +# Speed up compiling times. +if test "$GXX" = yes; then + CXXFLAGS="$CXXFLAGS -pipe" +fi + +## ------------------ ## +## Libraries set up. ## +## ------------------ ## + +# Check for Darwin. +AC_CANONICAL_HOST +AM_CONDITIONAL([DARWIN], [echo "$host_os" | grep '^darwin']) + +## --------------- ## +## Configuration. ## +## --------------- ## + +# Ask for config.h. +AM_CONFIG_HEADER([config.h]) + +# Ask for the Makefile creations. +AC_CONFIG_FILES([Makefile + gluit/Makefile + include/Makefile + libsrc/Makefile + utilsrc/Makefile]) + +AC_OUTPUT Index: external/trimesh/Makefile.am --- external/trimesh/Makefile.am (revision 2041) +++ external/trimesh/Makefile.am (working copy) @@ -1,20 +1,21 @@ -all win32 linux32 linux64 clean: - $(MAKE) -C libsrc $@ - $(MAKE) -C gluit $@ - $(MAKE) -C utilsrc $@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- -debug: - $(MAKE) -C libsrc DEBUG=y - $(MAKE) -C gluit DEBUG=y - $(MAKE) -C utilsrc DEBUG=y - -FINDCMD = find trimesh2 -name 'OBJ*' -prune -o -name CVS -prune -o -type f -print - -tar: - cd .. && tar zcvf trimesh2.tar.gz `$(FINDCMD) | sort` - -zip: - cd .. && $(FINDCMD) | sort | zip -9 trimesh2 -@ - -.PHONY : all clean debug default tar win32 zip +SUBDIRS = include libsrc gluit utilsrc +# FIXME: These files are not used with the new (Autotool'd) build +# system. We keep them until all their parameters have been +# transferred to configure.ac and Makefile.am's (e.g., support for +# Win32/Cygwin, etc.) +EXTRA_DIST = \ + Makedefs.Darwin \ + Makedefs.Linux \ + Makedefs.Linux64 \ + Makedefs.SunOS \ + Makedefs.Win32 \ + Makerules + +# FIXME: Convert this to Automake. +# debug: +# $(MAKE) -C libsrc DEBUG=y +# $(MAKE) -C gluit DEBUG=y +# $(MAKE) -C utilsrc DEBUG=y Index: external/trimesh/libsrc/Makefile.am --- external/trimesh/libsrc/Makefile.am (revision 2041) +++ external/trimesh/libsrc/Makefile.am (working copy) @@ -1,11 +1,12 @@ -# DEBUG = y -MAKERULESDIR = .. -DESTDIR = ../lib.$(UNAME) -INCLUDES = -I../include +## Process this file through Automake to produce Makefile.in -*- Makefile -*- -include $(MAKERULESDIR)/Makerules +AM_CPPFLAGS = -I$(top_srcdir)/include -CCFILES = TriMesh_bounding.cc \ +# FIXME: We should use Libtool instead. +lib_LIBRARIES = libtrimesh.a + +libtrimesh_a_SOURCES = \ + TriMesh_bounding.cc \ TriMesh_connectivity.cc \ TriMesh_curvature.cc \ TriMesh_io.cc \ @@ -26,20 +27,9 @@ reorder_verts.cc \ subdiv.cc - -OFILES = $(addprefix $(OBJDIR)/,$(CCFILES:.cc=.o)) -LIB = $(DESTDIR)/libtrimesh.a -default: $(LIB) - -$(LIB): $(OFILES) - $(STATICLIB) - -clean: - -rm -f $(OFILES) $(OBJDIR)/Makedepend $(OBJDIR)/*.d - -rm -rf $(OBJDIR)/ii_files - -rmdir $(OBJDIR) - -spotless: clean - -rm -f $(LIB) - -rmdir $(DESTDIR) - +# FIXME: Convert this to Automake. +# ifdef DEBUG +# AM_CPPFLAGS += -DDEBUG +# endif +# debug: +# $(MAKE) DEBUG=y Index: external/README --- external/README (revision 2043) +++ external/README (working copy) @@ -17,8 +17,8 @@ trimesh2 are open source, and are believed to be covered by GPL-compatible licenses. Please see the COPYING file.'' -This version of trimesh2 shipped with Olena no longer contains the -following files and directories: +This version of trimesh2 shipped with Olena has been autoconfiscated, +and no longer contains the following files and directories: bin.Linux/ mesh_align
participants (1)
-
Roland Levillain