Finally really fixing the segfault.
[gp-arc-client-c.git] / ext / extconf.rb
index 06a12b0..ebcfde7 100644 (file)
@@ -1,28 +1,35 @@
 require 'mkmf'
+
 dirs = <<-EODIRS
-/opt/local/include/libxml2 
-/opt/local/include/giomm-2.4 
-/opt/local/lib/giomm-2.4/include 
-/opt/local/include/glibmm-2.4 
-/opt/local/lib/glibmm-2.4/include 
-/opt/local/include/glib-2.0 
-/opt/local/lib/glib-2.0/include 
-/opt/local/include 
-/opt/local/include/sigc++-2.0 
-/opt/local/lib/sigc++-2.0/include
+/usr/local/include/libxml2 
+/usr/local/include/giomm-2.4 
+/usr/local/lib/giomm-2.4/include 
+/usr/local/include/glibmm-2.4 
+/usr/local/lib/glibmm-2.4/include 
+/usr/local/include/glib-2.0 
+/usr/local/lib/glib-2.0/include 
+/usr/local/include 
+/usr/local/include/sigc++-2.0 
+/usr/local/lib/sigc++-2.0/include
 EODIRS
 
 dirs.split.each do |dir|
   $INCFLAGS << " " << "-I#{dir}"
+  $INCFLAGS << " " << "-I#{dir.gsub('/usr/local', '/usr')}"
 end
 
 
-["/opt/local", "/usr/lib"].each do |prefix|
+["/usr/local", "/usr/lib"].each do |prefix|
 
   find_header "libxml/xmlmemory.h", "#{prefix}/include/libxml2"
   find_header "sigc++/slot.h", "#{prefix}/include/sigc++-2.0"
   find_header "sigc++/slot.h", "#{prefix}/lib/sigc++-2.0/include"
 end
 
-create_makefile("arc_client_r")
+#for debug info
+$CFLAGS << '-g'
+
+$LIBS << ' -larcclient -larccommon -larcdata2 -larcloader -larcmessage -lglibmm-2.4 -lsigc-2.0'
+
+create_makefile("arc_client_c")