Commit 1f9b4ecb3f13ca487d627a6f63e4e55b4c0fc1d4
1 parent
b785df39
set include directives
Showing
1 changed file
with
10 additions
and
4 deletions
m4/ac_find_lib_headers.m4
| ... | ... | @@ -53,7 +53,7 @@ |
| 53 | 53 | # You should have received a copy of the GNU General Public License |
| 54 | 54 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 55 | 55 | |
| 56 | -m4_define(AC_DEFUN([AC_FIND_LIB_HEADER],[ | |
| 56 | +AC_DEFUN([AC_FIND_LIB_HEADER],[ | |
| 57 | 57 | # Initialise status |
| 58 | 58 | AS_VAR_SET([ac_find_lib_status], [no]) |
| 59 | 59 | AS_VAR_SET([ac_find_header_status], [no]) |
| ... | ... | @@ -153,7 +153,7 @@ m4_define(AC_DEFUN([AC_FIND_LIB_HEADER],[ |
| 153 | 153 | |
| 154 | 154 | # Set flags |
| 155 | 155 | if test "x$3" != "x"; then |
| 156 | - AS_IF([test "$ac_find_lib_status" == yes ], | |
| 156 | + AS_IF([test "$ac_find_lib_status" = yes ], | |
| 157 | 157 | [LIBS="-l$1 $LIBS" |
| 158 | 158 | LDFLAGS="$LDFLAGS$ac_find_lib_add_LDFLAGS" |
| 159 | 159 | CPPFLAGS="$CPPFLAGS$ac_find_lib_add_CPPFLAGS" |
| ... | ... | @@ -162,7 +162,7 @@ m4_define(AC_DEFUN([AC_FIND_LIB_HEADER],[ |
| 162 | 162 | [AC_MSG_RESULT([not found]) |
| 163 | 163 | $5]) |
| 164 | 164 | else |
| 165 | - AS_IF([test "$ac_find_lib_status" == yes ], | |
| 165 | + AS_IF([test "$ac_find_lib_status" = yes ], | |
| 166 | 166 | [LIBS="-l$1 $LIBS" |
| 167 | 167 | LDFLAGS="$LDFLAGS$ac_find_lib_add_LDFLAGS" |
| 168 | 168 | AC_MSG_RESULT($ac_message) |
| ... | ... | @@ -170,5 +170,11 @@ m4_define(AC_DEFUN([AC_FIND_LIB_HEADER],[ |
| 170 | 170 | [AC_MSG_RESULT([not found]) |
| 171 | 171 | $5]) |
| 172 | 172 | fi |
| 173 | + | |
| 174 | + # Kluge to set include directives | |
| 175 | + if test "x$3" != "x" -a "$ac_find_lib_status" = yes; then | |
| 176 | + AC_CHECK_HEADERS([$header $3]) | |
| 177 | + fi | |
| 178 | + | |
| 173 | 179 | # echo "out: "$LIBS $LDFLAGS $CPPFLAGS |
| 174 | -])) | |
| 180 | +]) | ... | ... |