Browse code

Use the local copy of boost library only on x86_64

For any other CPU architecture fall back to the system-wide boost
(installed by OS packages)

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>

Martin Tzvetanov Grigorov authored on 02/03/2023 08:38:20
Showing 1 changed files
... ...
@@ -26,12 +26,18 @@ AC_CHECK_LIB(sbml, readSBML, , [SBML=false])
26 26
 
27 27
 
28 28
 #!/bin/sh
29
-if test -d ./src/boost.tar.gz;
29
+if test "$(uname -m)" == "x86_64";
30 30
   then
31
-      echo 'found boost header sources and tar archive;\n using what is there.'
32
-  else
33
-      echo "untarring boost include tree...";
34
-      tar -zxf ./src/boost.tar.gz -C ./src;
31
+    CPPFLAGS="-I. ${CPPFLAGS}"
32
+    if test -d ./src/boost;
33
+      then
34
+          echo 'found boost header sources and tar archive;\n using what is there.'
35
+      else
36
+          echo "untarring boost include tree...";
37
+          tar -zxf ./src/boost.tar.gz -C ./src;
38
+      fi
39
+   else
40
+      echo "Non x86_64 architecture. Using system-wide boost installation!"
35 41
 fi;
36 42
 
37 43
 AC_DEFUN([CHECK_XML],[
Browse code

fix mac locate.database warning

Ahmed Mohamed authored on 02/03/2019 13:31:31
Showing 1 changed files
... ...
@@ -27,7 +27,7 @@ AC_CHECK_LIB(sbml, readSBML, , [SBML=false])
27 27
 
28 28
 #!/bin/sh
29 29
 if test -d ./src/boost.tar.gz;
30
-  then 
30
+  then
31 31
       echo 'found boost header sources and tar archive;\n using what is there.'
32 32
   else
33 33
       echo "untarring boost include tree...";
... ...
@@ -45,42 +45,42 @@ PKG_LIBS="${LIBS}"
45 45
 
46 46
 if ${SBML}
47 47
   then
48
-    echo 'libSBML found, finding configuration...';   
49
-    if type "pkg-config" > /dev/null 
48
+    echo 'libSBML found, finding configuration...';
49
+    if type "pkg-config" > /dev/null
50 50
       then
51 51
           PKG_CONFIG="pkg-config"
52 52
           echo "pkg-config tool found"
53 53
       else
54 54
         AC_PATH_PROG(PKG_CONFIG, pkg-config)
55 55
     fi;
56
-    
56
+
57 57
     SBMLPC="libsbml"
58 58
     if test -z `${PKG_CONFIG} --exists ${SBMLPC}`
59 59
       then
60
-        SBMLPC=`locate libsbml.pc`
60
+        SBMLPC=`locate libsbml.pc 2>/dev/null`
61 61
     fi;
62
-    
62
+
63 63
     if test -n "${SBMLPC}"
64 64
       then
65
-        echo "libsbml.pc found. Using pkg-config to extract it."        
65
+        echo "libsbml.pc found. Using pkg-config to extract it."
66 66
         SBML_INCDIR="-DHAVE_SBML `${PKG_CONFIG} --cflags ${SBMLPC}`"
67 67
         SBML_LIBS=`${PKG_CONFIG} --libs ${SBMLPC}`
68 68
       else
69 69
         echo "Couldn't find libsbml.pc. Searching for libsbml in candidate directories."
70 70
         if test -d /usr/include/sbml
71 71
           then SBML_INCDIR="-DHAVE_SBML -I/usr/include/"
72
-          else 
72
+          else
73 73
             if test -d /usr/local/include/sbml
74 74
               then SBML_INCDIR="-DHAVE_SBML -I/usr/local/include/"
75 75
             fi;
76
-        fi;       
76
+        fi;
77 77
     fi;
78
-    CHECK_XML()               
78
+    CHECK_XML()
79 79
         SBML_INCDIR="$LIBXML_INCDIR $SBML_INCDIR"
80 80
         SBML_LIBS="$XML_LIBS"
81 81
     CPPFLAGS="${CPPFLAGS} ${SBML_INCDIR}"
82 82
     PKG_LIBS="${PKG_LIBS} ${SBML_LIBS} -lsbml"
83
-      
83
+
84 84
   else
85 85
     echo 'SBML not found.';
86 86
 
Browse code

autoconf modification to not require the installation dir named NetPathMiner

ahmohamed authored on 19/09/2016 23:04:03
Showing 1 changed files
... ...
@@ -1,4 +1,5 @@
1 1
 AC_INIT([NetPathMiner]) dnl package name, version
2
+AC_CONFIG_SRCDIR(DESCRIPTION) dnl make sure the dir is an R package
2 3
 
3 4
 dnl A user-specifiable option
4 5
 
Browse code

BUGFIX: include libxml2 correctly when libSBML is not present

ahmohamed authored on 18/09/2016 17:02:39
Showing 1 changed files
... ...
@@ -26,70 +26,72 @@ AC_CHECK_LIB(sbml, readSBML, , [SBML=false])
26 26
 
27 27
 #!/bin/sh
28 28
 if test -d ./src/boost.tar.gz;
29
-	then 
30
-			echo 'found boost header sources and tar archive;\n using what is there.'
31
-	else
32
-		  echo "untarring boost include tree...";
33
-		  tar -zxf ./src/boost.tar.gz -C ./src;
29
+  then 
30
+      echo 'found boost header sources and tar archive;\n using what is there.'
31
+  else
32
+      echo "untarring boost include tree...";
33
+      tar -zxf ./src/boost.tar.gz -C ./src;
34 34
 fi;
35 35
 
36 36
 AC_DEFUN([CHECK_XML],[
37
-	AC_PATH_PROGS(XML_CONFIG, xml2-config)
38
-	LIBXML_INCDIR="-DHAVE_XML `${XML_CONFIG} --cflags`"
39
-	XML_LIBS=`${XML_CONFIG} --libs`
37
+  AC_PATH_PROGS(XML_CONFIG, xml2-config)
38
+  LIBXML_INCDIR="-DHAVE_XML `${XML_CONFIG} --cflags`"
39
+  XML_LIBS=`${XML_CONFIG} --libs`
40 40
 ])
41 41
 
42 42
 PKG_LIBS="${LIBS}"
43 43
 
44 44
 
45 45
 if ${SBML}
46
-	then
47
-		echo 'libSBML found, finding configuration...';		
48
-		if type "pkg-config" > /dev/null 
49
-			then
50
-		  		PKG_CONFIG="pkg-config"
51
-		  		echo "pkg-config tool found"
52
-			else
53
-				AC_PATH_PROG(PKG_CONFIG, pkg-config)
54
-		fi;
55
-		
56
-		SBMLPC="libsbml"
57
-		if test -z `${PKG_CONFIG} --exists ${SBMLPC}`
58
-			then
59
-				SBMLPC=`locate libsbml.pc`
60
-		fi;
61
-		
62
-		if test -n "${SBMLPC}"
63
-			then
64
-				echo "libsbml.pc found. Using pkg-config to extract it."				
65
-				SBML_INCDIR="-DHAVE_SBML `${PKG_CONFIG} --cflags ${SBMLPC}`"
66
-				SBML_LIBS=`${PKG_CONFIG} --libs ${SBMLPC}`
67
-			else
68
-				echo "Couldn't find libsbml.pc. Searching for libsbml in candidate directories."
69
-				if test -d /usr/include/sbml
70
-					then SBML_INCDIR="-DHAVE_SBML -I/usr/include/"
71
-					else 
72
-						if test -d /usr/local/include/sbml
73
-							then SBML_INCDIR="-DHAVE_SBML -I/usr/local/include/"
74
-						fi;
75
-				fi;				
76
-		fi;
77
-		CHECK_XML()               
46
+  then
47
+    echo 'libSBML found, finding configuration...';   
48
+    if type "pkg-config" > /dev/null 
49
+      then
50
+          PKG_CONFIG="pkg-config"
51
+          echo "pkg-config tool found"
52
+      else
53
+        AC_PATH_PROG(PKG_CONFIG, pkg-config)
54
+    fi;
55
+    
56
+    SBMLPC="libsbml"
57
+    if test -z `${PKG_CONFIG} --exists ${SBMLPC}`
58
+      then
59
+        SBMLPC=`locate libsbml.pc`
60
+    fi;
61
+    
62
+    if test -n "${SBMLPC}"
63
+      then
64
+        echo "libsbml.pc found. Using pkg-config to extract it."        
65
+        SBML_INCDIR="-DHAVE_SBML `${PKG_CONFIG} --cflags ${SBMLPC}`"
66
+        SBML_LIBS=`${PKG_CONFIG} --libs ${SBMLPC}`
67
+      else
68
+        echo "Couldn't find libsbml.pc. Searching for libsbml in candidate directories."
69
+        if test -d /usr/include/sbml
70
+          then SBML_INCDIR="-DHAVE_SBML -I/usr/include/"
71
+          else 
72
+            if test -d /usr/local/include/sbml
73
+              then SBML_INCDIR="-DHAVE_SBML -I/usr/local/include/"
74
+            fi;
75
+        fi;       
76
+    fi;
77
+    CHECK_XML()               
78 78
         SBML_INCDIR="$LIBXML_INCDIR $SBML_INCDIR"
79 79
         SBML_LIBS="$XML_LIBS"
80
-		CPPFLAGS="${CPPFLAGS} ${SBML_INCDIR}"
81
-		PKG_LIBS="${PKG_LIBS} ${SBML_LIBS} -lsbml"
82
-			
83
-	else
84
-		echo 'SBML not found.';
85
-
86
-	if ${XML}
87
-		then
88
-			echo 'libXML2 found'
89
-			CHECK_XML()			
90
-		else
91
-			echo 'XML not found.';
92
-	fi;
80
+    CPPFLAGS="${CPPFLAGS} ${SBML_INCDIR}"
81
+    PKG_LIBS="${PKG_LIBS} ${SBML_LIBS} -lsbml"
82
+      
83
+  else
84
+    echo 'SBML not found.';
85
+
86
+  if ${XML}
87
+    then
88
+      echo 'libXML2 found'
89
+      CHECK_XML()
90
+      CPPFLAGS="${CPPFLAGS} ${LIBXML_INCDIR}"
91
+      PKG_LIBS="${PKG_LIBS} ${XML_LIBS}"
92
+    else
93
+      echo 'XML not found.';
94
+  fi;
93 95
 fi;
94 96
 
95 97
 
Browse code

empty commit

Ahmed Mohamed authored on 04/07/2015 00:36:26
Showing 1 changed files
1 1
old mode 100644
2 2
new mode 100755
Browse code

0.99.3

Bioconductor, No errors/warnings.

amfy10 authored on 09/04/2014 09:29:08
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@ fi;
35 35
 
36 36
 AC_DEFUN([CHECK_XML],[
37 37
 	AC_PATH_PROGS(XML_CONFIG, xml2-config)
38
-	LIBXML_INCDIR=`${XML_CONFIG} --cflags`
38
+	LIBXML_INCDIR="-DHAVE_XML `${XML_CONFIG} --cflags`"
39 39
 	XML_LIBS=`${XML_CONFIG} --libs`
40 40
 ])
41 41
 
... ...
@@ -62,37 +62,33 @@ if ${SBML}
62 62
 		if test -n "${SBMLPC}"
63 63
 			then
64 64
 				echo "libsbml.pc found. Using pkg-config to extract it."				
65
-				SBML_INCDIR=`${PKG_CONFIG} --cflags ${SBMLPC}`
65
+				SBML_INCDIR="-DHAVE_SBML `${PKG_CONFIG} --cflags ${SBMLPC}`"
66 66
 				SBML_LIBS=`${PKG_CONFIG} --libs ${SBMLPC}`
67 67
 			else
68 68
 				echo "Couldn't find libsbml.pc. Searching for libsbml in candidate directories."
69 69
 				if test -d /usr/include/sbml
70
-					then SBML_INCDIR="-I/usr/include/"
70
+					then SBML_INCDIR="-DHAVE_SBML -I/usr/include/"
71 71
 					else 
72 72
 						if test -d /usr/local/include/sbml
73
-							then SBML_INCDIR="-I/usr/local/include/"
73
+							then SBML_INCDIR="-DHAVE_SBML -I/usr/local/include/"
74 74
 						fi;
75
-				fi;
76
-				CHECK_XML()				
77
-				SBML_INCDIR="$LIBXML_INCDIR $SBML_INCDIR"
78
-				SBML_LIBS="$XML_LIBS"
75
+				fi;				
79 76
 		fi;
77
+		CHECK_XML()               
78
+        SBML_INCDIR="$LIBXML_INCDIR $SBML_INCDIR"
79
+        SBML_LIBS="$XML_LIBS"
80 80
 		CPPFLAGS="${CPPFLAGS} ${SBML_INCDIR}"
81 81
 		PKG_LIBS="${PKG_LIBS} ${SBML_LIBS} -lsbml"
82 82
 			
83 83
 	else
84
-		echo 'SBML not found.'; cd src; mv sbml_interface.cpp sbml_interface.c__;
85
-		mv sbml_interface.h sbml_interface.h__; cd ..;
84
+		echo 'SBML not found.';
86 85
 
87 86
 	if ${XML}
88 87
 		then
89 88
 			echo 'libXML2 found'
90
-			CHECK_XML()
91
-			CPPFLAGS="${CPPFLAGS} ${LIBXML_INCDIR}"
92
-			PKG_LIBS="${PKG_LIBS} ${XML_LIBS} -lxml2"
89
+			CHECK_XML()			
93 90
 		else
94
-			echo 'XML not found.'; cd src; 
95
-			mv kgml_interface.cpp kgml_interface.c__;  cd ..;
91
+			echo 'XML not found.';
96 92
 	fi;
97 93
 fi;
98 94
 
... ...
@@ -102,7 +98,6 @@ AC_SUBST(CPPFLAGS)
102 98
 AC_SUBST(PKG_LIBS)
103 99
 
104 100
 AC_OUTPUT(src/Makevars)
105
-chmod +x cleanup
106 101
 
107 102
 dnl cleanup after configure
108 103
 mv src/Makevars.in src/_Makevars.in_;
Browse code

Release 0.99.0 Biocunductor submission

amfy10 authored on 10/03/2014 12:16:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,109 @@
1
+AC_INIT([NetPathMiner]) dnl package name, version
2
+
3
+dnl A user-specifiable option
4
+
5
+dnl Select an optional include path, from a configure option
6
+dnl or from an environment variable.
7
+
8
+
9
+
10
+: ${R_HOME=`R RHOME`}
11
+if test -z "${R_HOME}"; then
12
+  echo "could not determine R_HOME"
13
+  exit 1
14
+fi
15
+
16
+CC=`"${R_HOME}/bin/R" CMD config CC`
17
+CPP=`"${R_HOME}/bin/R" CMD config CPP`
18
+CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
19
+CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
20
+AC_PROG_CC
21
+AC_PROG_CPP
22
+
23
+AC_CHECK_LIB(xml2, xmlParseFile,, [XML=false])
24
+AC_CHECK_LIB(sbml, readSBML, , [SBML=false])
25
+
26
+
27
+#!/bin/sh
28
+if test -d ./src/boost.tar.gz;
29
+	then 
30
+			echo 'found boost header sources and tar archive;\n using what is there.'
31
+	else
32
+		  echo "untarring boost include tree...";
33
+		  tar -zxf ./src/boost.tar.gz -C ./src;
34
+fi;
35
+
36
+AC_DEFUN([CHECK_XML],[
37
+	AC_PATH_PROGS(XML_CONFIG, xml2-config)
38
+	LIBXML_INCDIR=`${XML_CONFIG} --cflags`
39
+	XML_LIBS=`${XML_CONFIG} --libs`
40
+])
41
+
42
+PKG_LIBS="${LIBS}"
43
+
44
+
45
+if ${SBML}
46
+	then
47
+		echo 'libSBML found, finding configuration...';		
48
+		if type "pkg-config" > /dev/null 
49
+			then
50
+		  		PKG_CONFIG="pkg-config"
51
+		  		echo "pkg-config tool found"
52
+			else
53
+				AC_PATH_PROG(PKG_CONFIG, pkg-config)
54
+		fi;
55
+		
56
+		SBMLPC="libsbml"
57
+		if test -z `${PKG_CONFIG} --exists ${SBMLPC}`
58
+			then
59
+				SBMLPC=`locate libsbml.pc`
60
+		fi;
61
+		
62
+		if test -n "${SBMLPC}"
63
+			then
64
+				echo "libsbml.pc found. Using pkg-config to extract it."				
65
+				SBML_INCDIR=`${PKG_CONFIG} --cflags ${SBMLPC}`
66
+				SBML_LIBS=`${PKG_CONFIG} --libs ${SBMLPC}`
67
+			else
68
+				echo "Couldn't find libsbml.pc. Searching for libsbml in candidate directories."
69
+				if test -d /usr/include/sbml
70
+					then SBML_INCDIR="-I/usr/include/"
71
+					else 
72
+						if test -d /usr/local/include/sbml
73
+							then SBML_INCDIR="-I/usr/local/include/"
74
+						fi;
75
+				fi;
76
+				CHECK_XML()				
77
+				SBML_INCDIR="$LIBXML_INCDIR $SBML_INCDIR"
78
+				SBML_LIBS="$XML_LIBS"
79
+		fi;
80
+		CPPFLAGS="${CPPFLAGS} ${SBML_INCDIR}"
81
+		PKG_LIBS="${PKG_LIBS} ${SBML_LIBS} -lsbml"
82
+			
83
+	else
84
+		echo 'SBML not found.'; cd src; mv sbml_interface.cpp sbml_interface.c__;
85
+		mv sbml_interface.h sbml_interface.h__; cd ..;
86
+
87
+	if ${XML}
88
+		then
89
+			echo 'libXML2 found'
90
+			CHECK_XML()
91
+			CPPFLAGS="${CPPFLAGS} ${LIBXML_INCDIR}"
92
+			PKG_LIBS="${PKG_LIBS} ${XML_LIBS} -lxml2"
93
+		else
94
+			echo 'XML not found.'; cd src; 
95
+			mv kgml_interface.cpp kgml_interface.c__;  cd ..;
96
+	fi;
97
+fi;
98
+
99
+
100
+dnl subsutitute varialbles in makevars
101
+AC_SUBST(CPPFLAGS)
102
+AC_SUBST(PKG_LIBS)
103
+
104
+AC_OUTPUT(src/Makevars)
105
+chmod +x cleanup
106
+
107
+dnl cleanup after configure
108
+mv src/Makevars.in src/_Makevars.in_;
109
+rm config.*