# On RHEL 7 and friends, you need to link to libglapi too
# Ward Poelmans <ward.poelmans@ugent.be>
diff -ur fsl.oirg/src/fslsurface/Makefile fsl/src/fslsurface/Makefile
--- fsl.oirg/src/fslsurface/Makefile    2014-02-24 12:09:05.000000000 +0100
+++ fsl/src/fslsurface/Makefile 2016-04-21 18:03:50.246117983 +0200
@@ -37,7 +37,7 @@
 USRLDFLAGS = -L${LIB_NEWMAT}  -L${LIB_PROB} -L${LIB_ZLIB}
 
 
-LIBS=-lgiftiio -lexpat -lfirst_lib -lmeshclass
+LIBS=-lgiftiio -lexpat -lfirst_lib -lmeshclass -lglapi
 
 APPLY_ZLIB = -DHAVE_ZLIB
 
