2 changes: 1 addition & 1 deletion arf.h
Expand Up @@ -37,7 +37,7 @@

#include <stdio.h>
#include <math.h>
#include "flint.h"
#include "flint/flint.h"
#include "fmpr.h"
#include "mag.h"

Expand Down
2 changes: 1 addition & 1 deletion arf/div.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/mpn_extras.h"
#include "arf.h"
#include "mpn_extras.h"

#if !defined(__MPIR_VERSION)
#define USE_GMP_DIV_Q 1
Expand Down
2 changes: 1 addition & 1 deletion arf/get_d.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/double_extras.h"
#include "arf.h"
#include "double_extras.h"

/* most double: (2^53-1) * 2^971 */
/* least normal: 2^-1022 */
Expand Down
2 changes: 1 addition & 1 deletion arf/set_d.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/double_extras.h"
#include "arf.h"
#include "double_extras.h"

void
arf_set_d(arf_t x, double v)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-add_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int
arf_add_si_naive(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-add_ui.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "ulong_extras.h"
#include "flint/ulong_extras.h"

int
arf_add_ui_naive(arf_t z, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-addmul_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int
arf_addmul_si_naive(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-mul_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int
arf_mul_si_naive(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-mul_ui.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "ulong_extras.h"
#include "flint/ulong_extras.h"

int
arf_mul_ui_naive(arf_t z, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-sub_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int
arf_sub_si_naive(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-sub_ui.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "ulong_extras.h"
#include "flint/ulong_extras.h"

int
arf_sub_ui_naive(arf_t z, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion arf/test/t-submul_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "arf.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int
arf_submul_si_naive(arf_t z, const arf_t x, slong y, slong prec, arf_rnd_t rnd)
Expand Down
10 changes: 5 additions & 5 deletions bernoulli.h
Expand Up @@ -27,11 +27,11 @@
#define BERNOULLI_H

#include <math.h>
#include "flint.h"
#include "fmpz.h"
#include "fmpz_vec.h"
#include "fmpq.h"
#include "arith.h"
#include "flint/flint.h"
#include "flint/fmpz.h"
#include "flint/fmpz_vec.h"
#include "flint/fmpq.h"
#include "flint/arith.h"
#include "arb.h"

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions bernoulli/test/t-fmpq_ui.c
Expand Up @@ -25,8 +25,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "fmpz_vec.h"
#include "arith.h"
#include "flint/fmpz_vec.h"
#include "flint/arith.h"
#include "bernoulli.h"

int main()
Expand Down
6 changes: 3 additions & 3 deletions bernoulli/test/t-rev.c
Expand Up @@ -26,9 +26,9 @@
#include <stdio.h>
#include <stdlib.h>
#include "bernoulli.h"
#include "ulong_extras.h"
#include "nmod_poly.h"
#include "nmod_vec.h"
#include "flint/ulong_extras.h"
#include "flint/nmod_poly.h"
#include "flint/nmod_vec.h"

int main()
{
Expand Down
4 changes: 2 additions & 2 deletions bool_mat.h
Expand Up @@ -33,8 +33,8 @@
#endif

#include <stdio.h>
#include "flint.h"
#include "fmpz_mat.h"
#include "flint/flint.h"
#include "flint/fmpz_mat.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion bool_mat/nilpotency_degree.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/fmpz_mat.h"
#include "bool_mat.h"
#include "fmpz_mat.h"

/*
* Postorder traversal of a DAG follows
Expand Down
2 changes: 1 addition & 1 deletion bool_mat/randtest.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/perm.h"
#include "bool_mat.h"
#include "perm.h"

void
bool_mat_randtest(bool_mat_t mat, flint_rand_t state)
Expand Down
2 changes: 1 addition & 1 deletion bool_mat/test/t-all_pairs_longest_walk.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "bool_mat.h"
#include "perm.h"
#include "flint/perm.h"


int
Expand Down
2 changes: 1 addition & 1 deletion bool_mat/test/t-transitive_closure.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "bool_mat.h"
#include "perm.h"
#include "flint/perm.h"

/* permute rows and columns of a square matrix */
void
Expand Down
9 changes: 8 additions & 1 deletion configure
Expand Up @@ -263,9 +263,16 @@ else
fi

if [ -d "${FLINT_INC_DIR}/flint" ]; then
FLINT_INC_DIR="${FLINT_INC_DIR}/flint"
FLINT_INC_DIR="${FLINT_INC_DIR}"
elif [ -f "${FLINT_INC_DIR}/flint.h" ]; then
mkdir -p build/include
ln -sf ${FLINT_INC_DIR} build/include/flint
FLINT_INC_DIR="${PWD}/build/include"
fi

echo "FLINT_LIB_DIR set to ${FLINT_LIB_DIR}"
echo "FLINT_INC_DIR set to ${FLINT_INC_DIR}"

LIB_DIRS="${LIB_DIRS} ${FLINT_LIB_DIR}"
INC_DIRS="${INC_DIRS} ${FLINT_INC_DIR}"
LIBS="${LIBS} flint"
Expand Down
2 changes: 1 addition & 1 deletion examples/complex_plot.c
Expand Up @@ -4,7 +4,7 @@
#include "acb.h"
#include "acb_hypgeom.h"
#include "acb_modular.h"
#include "profiler.h"
#include "flint/profiler.h"

/* HLS algorithm from python's colorsys module */
static double
Expand Down
2 changes: 1 addition & 1 deletion examples/hilbert_matrix.c
@@ -1,7 +1,7 @@
/* This file is public domain. Author: Fredrik Johansson. */

#include "arb_mat.h"
#include "profiler.h"
#include "flint/profiler.h"

int main(int argc, char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion examples/integrals.c
@@ -1,7 +1,7 @@
/* This file is public domain. Author: Fredrik Johansson. */

#include "acb_calc.h"
#include "profiler.h"
#include "flint/profiler.h"

int
sinx(acb_ptr out, const acb_t inp, void * params, slong order, slong prec)
Expand Down
2 changes: 1 addition & 1 deletion examples/keiper_li.c
Expand Up @@ -4,7 +4,7 @@
#include "arb.h"
#include "acb.h"
#include "arb_poly.h"
#include "profiler.h"
#include "flint/profiler.h"

void
keiper_li_series(arb_ptr z, slong len, slong prec)
Expand Down
2 changes: 1 addition & 1 deletion examples/pi.c
@@ -1,7 +1,7 @@
/* This file is public domain. Author: Fredrik Johansson. */

#include "arb.h"
#include "profiler.h"
#include "flint/profiler.h"

int main(int argc, char *argv[])
{
Expand Down
4 changes: 2 additions & 2 deletions examples/poly_roots.c
Expand Up @@ -3,8 +3,8 @@
#include <string.h>
#include "acb.h"
#include "acb_poly.h"
#include "arith.h"
#include "profiler.h"
#include "flint/arith.h"
#include "flint/profiler.h"

int check_accuracy(acb_ptr vec, slong len, slong prec)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/real_roots.c
Expand Up @@ -3,7 +3,7 @@
#include <string.h>
#include "arb_calc.h"
#include "acb_hypgeom.h"
#include "profiler.h"
#include "flint/profiler.h"

slong eval_count = 0;

Expand Down
8 changes: 4 additions & 4 deletions fmpr.h
Expand Up @@ -33,12 +33,12 @@
#include <limits.h>
#include <gmp.h>
#include <mpfr.h>
#include "flint.h"
#include "fmpz.h"
#include "fmpq.h"
#include "flint/flint.h"
#include "flint/fmpz.h"
#include "flint/fmpq.h"
#include "flint/config.h"
#include "fmpz_extras.h"

#include "config.h"
#ifdef HAVE_TLS
#if HAVE_TLS
#define TLS_PREFIX __thread
Expand Down
2 changes: 1 addition & 1 deletion fmpr/test/t-mul_si.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/long_extras.h"
#include "fmpr.h"
#include "long_extras.h"

static slong
fmpr_mul_si_naive(fmpr_t z, const fmpr_t x, slong y, slong prec, fmpr_rnd_t rnd)
Expand Down
2 changes: 1 addition & 1 deletion fmpr/test/t-mul_ui.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/ulong_extras.h"
#include "fmpr.h"
#include "ulong_extras.h"

static slong
fmpr_mul_ui_naive(fmpr_t z, const fmpr_t x, ulong y, slong prec, fmpr_rnd_t rnd)
Expand Down
4 changes: 2 additions & 2 deletions fmpz_extras.h
Expand Up @@ -27,8 +27,8 @@
#define FMPZ_EXTRAS_H

#include <limits.h>
#include "flint.h"
#include "fmpz.h"
#include "flint/flint.h"
#include "flint/fmpz.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions fmpz_mat_extras.h
Expand Up @@ -26,8 +26,8 @@
#ifndef FMPZ_MAT_EXTRAS_H
#define FMPZ_MAT_EXTRAS_H

#include "flint.h"
#include "fmpz_mat.h"
#include "flint/flint.h"
#include "flint/fmpz_mat.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion fmpz_mat_extras/test/t-transitive_closure.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "fmpz_mat_extras.h"
#include "perm.h"
#include "flint/perm.h"

/* transitive closure can only turn zeros into ones */
int
Expand Down
2 changes: 1 addition & 1 deletion hypgeom.h
Expand Up @@ -26,9 +26,9 @@
#ifndef HYPGEOM_H
#define HYPGEOM_H

#include "flint/fmpz_poly.h"
#include "arb.h"
#include "mag.h"
#include "fmpz_poly.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion hypgeom/bound.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include <math.h>
#include "double_extras.h"
#include "flint/double_extras.h"
#include "hypgeom.h"

slong
Expand Down
2 changes: 1 addition & 1 deletion hypgeom/estimate_terms_d.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include <math.h>
#include "double_extras.h"
#include "flint/double_extras.h"
#include "hypgeom.h"

#define LOG2 0.69314718055994530942
Expand Down
4 changes: 2 additions & 2 deletions mag.h
Expand Up @@ -34,8 +34,8 @@

#include <stdio.h>
#include <math.h>
#include "flint.h"
#include "fmpz.h"
#include "flint/flint.h"
#include "flint/fmpz.h"
#include "fmpz_extras.h"

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion mag/d_log.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/double_extras.h"
#include "mag.h"
#include "double_extras.h"

/*
This is a bad implementation the logarithm function,
Expand Down
2 changes: 1 addition & 1 deletion mag/exp.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/double_extras.h"
#include "mag.h"
#include "double_extras.h"

static const double inverse_factorials[] = {
1.0,
Expand Down
2 changes: 1 addition & 1 deletion mag/get_d.c
Expand Up @@ -23,7 +23,7 @@
******************************************************************************/

#include "double_extras.h"
#include "flint/double_extras.h"
#include "mag.h"

double
Expand Down
2 changes: 1 addition & 1 deletion mag/log1p.c
Expand Up @@ -23,8 +23,8 @@
******************************************************************************/

#include "flint/double_extras.h"
#include "mag.h"
#include "double_extras.h"

void
mag_log1p(mag_t z, const mag_t x)
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-cmp_2exp_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "mag.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int main()
{
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-d_log_lower_bound.c
Expand Up @@ -23,7 +23,7 @@
******************************************************************************/

#include "double_extras.h"
#include "flint/double_extras.h"
#include "mag.h"

/* XXX: d_randtest is not good enough */
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-d_log_upper_bound.c
Expand Up @@ -23,7 +23,7 @@
******************************************************************************/

#include "double_extras.h"
#include "flint/double_extras.h"
#include "mag.h"

/* XXX: d_randtest is not good enough */
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-mul_2exp_si.c
Expand Up @@ -24,7 +24,7 @@
******************************************************************************/

#include "mag.h"
#include "long_extras.h"
#include "flint/long_extras.h"

int main()
{
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-set_d.c
Expand Up @@ -23,7 +23,7 @@
******************************************************************************/

#include "double_extras.h"
#include "flint/double_extras.h"
#include "mag.h"

/* XXX: d_randtest is not good enough */
Expand Down
2 changes: 1 addition & 1 deletion mag/test/t-set_d_2exp_fmpz.c
Expand Up @@ -23,7 +23,7 @@
******************************************************************************/

#include "double_extras.h"
#include "flint/double_extras.h"
#include "mag.h"

/* XXX: d_randtest is not good enough */
Expand Down
4 changes: 2 additions & 2 deletions partitions.h
Expand Up @@ -27,8 +27,8 @@
#define PARTITIONS_H

#include <math.h>
#include "flint.h"
#include "arith.h"
#include "flint/flint.h"
#include "flint/arith.h"
#include "arb.h"

#ifdef __cplusplus
Expand Down
2 changes: 0 additions & 2 deletions partitions/hrr_sum_arb.c
Expand Up @@ -24,8 +24,6 @@
******************************************************************************/

#include "partitions.h"

#include "arith.h"
#include "arb.h"
#include "math.h"

Expand Down
2 changes: 1 addition & 1 deletion partitions/test/t-partitions_fmpz_ui.c
Expand Up @@ -23,7 +23,7 @@

******************************************************************************/

#include "arith.h"
#include "flint/arith.h"
#include "partitions.h"

/* Values mod 10^9 generated with Sage */
Expand Down
2 changes: 1 addition & 1 deletion partitions/test/t-partitions_fmpz_ui_threaded.c
Expand Up @@ -23,7 +23,7 @@

******************************************************************************/

#include "arith.h"
#include "flint/arith.h"
#include "partitions.h"

/* Values mod 10^9 */
Expand Down
2 changes: 1 addition & 1 deletion partitions/test/t-partitions_fmpz_ui_using_doubles.c
Expand Up @@ -23,7 +23,7 @@

******************************************************************************/

#include "arith.h"
#include "flint/arith.h"
#include "partitions.h"

/* Values mod 10^9 generated with Sage */
Expand Down