Skip to content

Commit

Permalink
build: fix build when num is missing (fix #47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Jul 5, 2020
1 parent 6aa3f5a commit 365635a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CAMLP4LIB_BYTE=@CAMLP4LIB_BYTE@
OCAMLDOC=@OCAMLDOC@
OCAMLMKTOP=@OCAMLMKTOP@
OCAMLVERSION_MAJOR=@OCAMLVERSION_MAJOR@
NUMS=@NUMS@
NUMS_INCLUDE=@NUMS_INCLUDE@

LABLGL_CMA=@LABLGL_CMA@
LABLGL_CMXA=@LABLGL_CMXA@
Expand Down
6 changes: 3 additions & 3 deletions config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SRC_FILETP=src/networks/fileTP
SUBDIRS=$(EXTLIB) $(CDK) $(BITSTRING) $(LIB) $(RSS) $(XML) $(NET) tools \
$(COMMON) $(DRIVER) $(MP3) src/config/$(OS_FILES)

INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4 $(NUMS)
INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4 $(NUMS_INCLUDE)

CFLAGS:=$(CFLAGS) $(CONFIG_INCLUDES) $(GTKCFLAGS) $(GD_CFLAGS)

Expand Down Expand Up @@ -591,8 +591,8 @@ BITSTRING_CMXA=bitstring.cmxa
BITSTRING_CMA=bitstring.cma
endif
ifeq ("$(BITTORRENT)", "yes")
LIBS_byte += $(NUMS) nums.cma
LIBS_opt += $(NUMS) nums.cmxa
LIBS_byte += $(NUMS_INCLUDE) nums.cma
LIBS_opt += $(NUMS_INCLUDE) nums.cmxa
BITSTRING_CMXA=bitstring.cmxa
BITSTRING_CMA=bitstring.cma
endif
Expand Down
14 changes: 7 additions & 7 deletions config/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -737,16 +737,16 @@ if test "$DEV" = "yes"; then
DEVFLAGS="-annot -bin-annot -w @a\$(MINUS_WARNING)"
fi

NUMS_INCLUDE=
NUMS=yes
AC_MSG_CHECKING([ocaml num library])
if test -f $OCAMLLIB/nums.$OCAMLLIB_EXT; then
NUMS=
else
if ! test -f $OCAMLLIB/nums.$OCAMLLIB_EXT; then
if test -f $OCAMLLIB/num/nums.$OCAMLLIB_EXT; then
NUMS="-I +num"
NUMS_INCLUDE="-I +num"
else
NUMS_PATH="`ocamlfind query num 2> /dev/null`"
if test "$NUMS_PATH" != ""; then
NUMS="-I $NUMS_PATH"
NUMS_INCLUDE="-I $NUMS_PATH"
else
NUMS=no
fi
Expand All @@ -756,7 +756,7 @@ fi
if test "$NUMS" = "no"; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([found $NUMS])
AC_MSG_RESULT([found $NUMS_INCLUDE])
fi

echo ""
Expand Down Expand Up @@ -1580,7 +1580,7 @@ AC_SUBST(CONFIGURE_ARGUMENTS)
AC_SUBST(CONFIGURE_RUN)
AC_SUBST(DEVFLAGS)
AC_SUBST(OCAMLVERSION_MAJOR)
AC_SUBST(NUMS)
AC_SUBST(NUMS_INCLUDE)

AUTOCONF=../src/utils/lib/autoconf.ml
GTK_AUTOCONF=../src/utils/lib/gAutoconf.ml
Expand Down

0 comments on commit 365635a

Please sign in to comment.