Theoretical Maximum of DFT For any discrete input signal between +1 and -1, what is the theoretical maximum DFT? 

If the input is a cosine of $N$ samples with amplitude $A$, the peak spectral magnitude is $A*N/2$. But what about any arbitrary waveform? 

A square wave with the same amplitude as the cosine is composed of various sines, the fundamental frequency of which has a greater magnitude than the square wave. Therefore the Fourier transform of a square wave with amplitude also between $1$ and $-1$ is greater than the cosine with amplitude between $+1$ and $-1$. 

But generalizing this to any waveform, ie a triangle wave, sawtooth wave, and also non geometrically "nice" waves, all with amplitudes between $+1$ and $-1$, what is the theoretical maximum?

I want to know because I need to represent the output of a DFT with 16 signed bits. However if the magnitude of the DFT is greater than $2^{15}$ I would need to scale. I therefore need to determine if this will ever happen (for any input waveform) and how much the scaling factor should be. 

Thank you very much,
A simple bound is just  the number of samples. Indeed, for
$$ X_k = \sum_{n=0}^{N-1} x[n]e^{-2i\pi kn/N}$$
then obviously:

$$ |X_k| \le \sum_{n=0}^{N-1} \left|x[n]\right|\left|e^{-2i\pi kn/N}\right|$$
hence 
$$ |X_k| \le \sum_{n=0}^{N-1} \left|x[n]\right|\le N$$
if $-1\le x[n]\le 1$. The $N$ bound is
s attained for a given $k$ when you choose a complex $x[n]=\overline{e^{-2i\pi kn/N}} = e^{2i\pi kn/N}$. If your input allows a constant signal  (equal to one), $x[n]=1$, then this is attained for the zeroth frequency $X_0 =  \sum_{n=0}^{N-1} 1 = N$. As a side note, if the signal length is a power of $2$, this is quite convenient. 

For more restricted inputs, like real, zero-average signals only, there could be a tighter bound. A recent paper presented at SampTA 2017 provides DFT bounds for some random sequences (Bernoulli): Bounds on Discrete Fourier Transform of Random Mask (published version).